1 !WRF:MEDIATION_LAYER:PHYSICS
2 ! *** add new modules of schemes here
4 MODULE module_microphysics_driver
5 real, private, parameter :: QX_MIN = 1.E-12
6 real, private, parameter :: NI_MIN = 1.E-6
9 SUBROUTINE microphysics_driver( &
11 ,ht, dz8w, p8w, dt,dx,dy &
12 ,mp_physics, spec_zone &
13 ,specified, channel_switch &
17 ,cldfra, cldfra_old, exch_h, nsource &
18 ,qlsink, precr, preci, precs, precg &
19 ,xland,snowh,itimestep &
20 ,f_ice_phy,f_rain_phy,f_rimef_phy &
22 ,ids,ide, jds,jde, kds,kde &
23 ,ims,ime, jms,jme, kms,kme &
24 ,ips,ipe, jps,jpe, kps,kpe &
25 ,i_start,i_end,j_start,j_end,kts,kte &
27 ,irrigation,sf_surf_irr_scheme, irr_daily_amount &
28 ,irr_start_hour,irr_num_hours,julian_in &
29 ,irr_start_julianday,irr_end_julianday &
30 ,irr_freq,irr_ph,irr_rand_field &
32 !======================
33 !Variables required for CAMMGMP Scheme
34 ,dlf,dlf2,t_phy,p_hyd,p8w_hyd,tke_pbl,pblh &
35 ,z_at_mass,z_at_w,qfx &
36 ,rliq,turbtype3d,smaw3d,wsedl3d,cldfra_old_mp &
37 ,cldfra_mp,cldfra_mp_all,lradius,iradius &
38 ,cldfrai,cldfral,cldfra_conv &
40 ,accum_mode,aitken_mode,coarse_mode &
41 ,icwmrsh3d,icwmrdp3d,shfrc3d,cmfmc3d,cmfmc2_3d &
42 ,config_flags,fnm,fnp,rh_old_mp,lcd_old_mp &
44 ,chem &! For CAMMGMP scheme Prognostic aerosols
45 ,qme3d,prain3d,nevapr3d,rate1ord_cw2pr_st3d &
48 !======================
49 ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr &
50 ,qic_curr,qip_curr,qid_curr &
51 ,qnic_curr,qnip_curr,qnid_curr &
52 ,qndrop_curr,qni_curr,qh_curr,qnh_curr &
53 ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr &
54 ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr &
55 ,qnwfa_curr,qnifa_curr,qnbca_curr & ! for water/ice-friendly/black carbon aerosols
56 ,f_qnwfa,f_qnifa,f_qnbca & ! for water/ice-friendly/black carbon aerosols
57 ,qvolg_curr,qvolh_curr &
58 ,qdcn_curr,qtcn_curr,qccn_curr,qrcn_curr & ! for ntu3m
59 ,qnin_curr,fi_curr,fs_curr,vi_curr,vs_curr & ! for ntu3m
60 ,vg_curr,ai_curr,as_curr,ag_curr,ah_curr,i3m_curr & ! for ntu3m
61 ,f_qdcn,f_qtcn,f_qccn,f_qrcn,f_qnin,f_fi,f_fs & ! for ntu3m
62 ,f_vi,f_vs,f_vg,f_ai,f_as,f_ag,f_ah,f_i3m & ! for ntu3m
63 ,qir_curr,qib_curr & ! for P3
64 ,qi2_curr,qni2_curr,qir2_curr,qib2_curr & ! for P3
65 ,qvoli_curr,qaoli_curr & ! for Jensen ISHMAEL
66 ,qvoli2_curr,qaoli2_curr & ! for Jensen ISHMAEL
67 ,qi3_curr,qni3_curr,qvoli3_curr,qaoli3_curr & ! for Jensen ISHMAEL
68 ,effr_curr,ice_effr_curr,tot_effr_curr &
69 ,qic_effr_curr,qip_effr_curr,qid_effr_curr &
70 ,f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni &
71 ,f_qns,f_qnr,f_qng,f_qnc,f_qnn,f_qh,f_qnh &
72 , f_qzr,f_qzi,f_qzs,f_qzg,f_qzh &
75 ,f_qnic,f_qnip,f_qnid &
76 ,f_qir,f_qib & ! for P3
77 ,f_qi2,f_qni2,f_qir2,f_qib2 & ! for P3
78 ,f_qvoli,f_qaoli & ! for Jensen ISHMAEL
79 ,f_qvoli2,f_qaoli2 & ! for Jensen ISHMAEL
80 ,f_qi3,f_qni3,f_qvoli3,f_qaoli3 & ! for Jensen ISHMAEL
81 ,f_effr,f_ice_effr,f_tot_effr &
82 ,f_qic_effr,f_qip_effr,f_qid_effr &
84 ,qrcuten, qscuten, qicuten, qccuten &
86 ,mp_restart_state,tbpvs_state,tbpvs0_state & ! for etampnew or fer_mp_hires
87 ,hail,ice2 & ! for mp_gsfcgce
88 !NUWRF JJS 20110525 vvvvv
89 ,phys_tot, physc, physe, physd, physs, physm, physf& ! for gsfcgce
90 ,acphys_tot, acphysc, acphyse, acphysd & ! for gsfcgce
91 ,acphyss, acphysm, acphysf & ! for gsfcgce
93 ,re_cloud_gsfc, re_rain_gsfc, re_ice_gsfc &
94 ,re_snow_gsfc, re_graupel_gsfc, re_hail_gsfc & ! cloud effective radius
95 ,precr3d, preci3d, precs3d, precg3d, prech3d &
97 ,icn_diag, nc_diag & ! inline gocart
98 ,gsfcgce_gocart_coupling &
100 !NUWRF JJS 20110525 ^^^^^
101 ! ,ccntype & ! for mp_milbrandt2mom
106 ,graupelnc, graupelncv &
107 #if ( WRF_CHEM == 1 )
108 ,rainprod, evapprod &
109 ,qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp &
111 ,qnwfa2d, qnifa2d, qnbca2d & ! for water/ice-friendly/black carbon aerosols
112 ,qnocbb2d, qnbcbb2d & ! for biomass burning aerosols
113 ,refl_10cm & ! HM, 9/22/09, add for refl
117 ,phii3d & ! for Jensen ISHMAEL
120 ,rhopo3d_2 & ! for P3
121 ,phii3d_2 & ! for Jensen ISHMAEL
122 ,vmi3d_3 & ! for Jensen ISHMAEL
123 ,di3d_3 & ! for Jensen ISHMAEL
124 ,rhopo3d_3 & ! for Jensen ISHMAEL
125 ,phii3d_3 & ! for Jensen ISHMAEL
126 ,itype & ! for Jensen ISHMAEL
127 ,itype_2 & ! for Jensen ISHMAEL
128 ,itype_3 & ! for Jensen ISHMAEL
131 ! Added the RI_CURR array to the call
133 ,diagflag, do_radar_ref &
135 ,re_cloud, re_ice, re_snow & ! G. Thompson
136 ,has_reqc, has_reqi, has_reqs & ! G. Thompson
139 ,kext_ql,kext_qs,kext_qg &
141 ,kext_qic,kext_qid,kext_qip &
142 ,kext_ft_qic,kext_ft_qid,kext_ft_qip &
143 ,kext_ft_qs,kext_ft_qg &
148 ,qrimef_curr,f_qrimef &
151 ,sbmradar,num_sbmradar &
153 ,aerocu,aercu_fct,no_src_types_cu &
154 ,PBL,EFCG,EFIG,EFSG,WACT,CCN1_GS,CCN2_GS &
155 ,CCN3_GS,CCN4_GS,CCN5_GS,CCN6_GS,CCN7_GS &
156 ,NR_CU,QR_CU,NS_CU,QS_CU,CU_UAF,mskf_refl_10cm &
159 ,pert_thom, perts_qvapor, perts_qcloud, perts_qice &
160 ,perts_qsnow, perts_ni &
161 ,pert_thom_qv,pert_thom_qc,pert_thom_qi &
162 ,pert_thom_qs,pert_thom_ni &
166 USE module_state_description, ONLY : &
167 KESSLERSCHEME, LINSCHEME, SBU_YLINSCHEME, WSM3SCHEME, WSM5SCHEME &
168 ,WSM6SCHEME, ETAMPNEW, FER_MP_HIRES, THOMPSON, THOMPSONAERO, THOMPSONGH, FAST_KHAIN_LYNN_SHPUND, MORR_TWO_MOMENT &
169 ,GSFCGCESCHEME, WDM5SCHEME, WDM6SCHEME, NSSL_2MOM, NSSL_2MOMCCN, NSSL_2MOMG, MADWRF_MP &
170 ,NSSL_1MOM,NSSL_1MOMLFO, FER_MP_HIRES_ADVECT & ! ,NSSL_3MOM &
171 ,WSM7SCHEME, WDM7SCHEME &
173 ,MILBRANDT2MOM , CAMMGMPSCHEME,FULL_KHAIN_LYNN, P3_1CATEGORY, P3_1CATEGORY_NC, P3_2CATEGORY, P3_1CAT_3MOM &
174 ,MORR_TM_AERO, JENSEN_ISHMAEL, SPRINKLER, NTU !,MILBRANDT3MOM
175 USE module_state_description, ONLY : WSM6RSCHEME
177 USE module_state_description, ONLY : LSCONDSCHEME, MKESSLERSCHEME
179 #if ( WRF_CHEM == 1 )
181 USE module_state_description, ONLY : &
182 num_chem & !inline gocart
183 ,p_bc1, p_bc2, p_oc1, p_oc2 & !inline gocart
184 ,p_dust_1, p_dust_2, p_dust_3 & !inline gocart
185 ,p_dust_4, p_dust_5 & !inline gocart
186 ,p_sulf, p_seas_1, p_seas_2 & !inline gocart
192 USE module_dm, ONLY : &
193 local_communicator, mytask, wrf_dm_min_real, wrf_dm_max_real
197 USE module_model_constants
199 USE module_configure, only: grid_config_rec_type
200 #if ( WRF_CHEM == 1 )
201 !mchen USE module_state_description, only: num_scalar ! For CAMMGMP scheme Prognostic aerosols
202 USE module_state_description, only: num_chem ! mchen
203 USE modal_aero_data, only: ntot_amode_cam_mam => ntot_amode ! For CAMMGMP scheme Prognostic aerosols
206 ! *** add new modules of schemes here
208 USE module_mp_kessler
210 USE module_mp_mkessler
211 USE module_mp_nconvp ! added by Zhuxiao
214 USE module_mp_sbu_ylin
218 USE module_mp_wsm6r, ONLY:wsm6r
221 USE module_mp_fer_hires
222 USE module_mp_thompson
223 USE module_mp_full_sbm
224 #if ( BUILD_SBM_FAST == 1 )
225 USE module_mp_fast_sbm
227 USE module_mp_gsfcgce
228 USE module_mp_gsfcgce_4ice_nuwrf, only: gsfcgce_4ice_nuwrf
229 USE module_mp_morr_two_moment
231 USE module_mp_jensen_ishmael
233 USE module_mp_morr_two_moment_aero
239 USE module_mp_milbrandt2mom
241 USE module_mp_cammgmp_driver, ONLY: CAMMGMP ! CAM5's microphysics driver
243 ! USE module_mp_milbrandt3mom
244 USE module_mp_nssl_2mom
246 USE module_mixactivate, only: prescribe_aerosol_mixactivate
248 ! For checking model timestep is history time (for radar reflectivity)
249 USE module_utility, ONLY: WRFU_Clock, WRFU_Alarm
250 USE module_domain, ONLY : HISTORY_ALARM, Is_alarm_tstep
251 USE module_irrigation
255 !----------------------------------------------------------------------
256 ! This driver calls subroutines for the microphys.
261 ! Lin et al. (1983), Rutledge and Hobbs (1984)
262 ! WRF Single-Moment 3-class, Hong, Dudhia and Chen (2004)
263 ! WRF Single-Moment 5-class, Hong, Dudhia and Chen (2004)
264 ! WRF Single-Moment 6-class, Lim and Hong (2003 WRF workshop)
265 ! Eta Grid-scale Cloud and Precipitation scheme (EGCP01, Ferrier)
266 ! * etampnew - what's in the operational 4-km High-Resolution Window Runs
267 ! Goddard 4-ice scheme (2016)
269 ! Milbrandt and Yau (2005)
273 ! WRF Double-Moment 5-class
274 ! WRF Double-Moment 6-class
276 !----------------------------------------------------------------------
278 !======================================================================
279 ! Grid structure in physics part of WRF
280 !----------------------------------------------------------------------
281 ! The horizontal velocities used in the physics are unstaggered
282 ! relative to temperature/moisture variables. All predicted
283 ! variables are carried at half levels except w, which is at full
284 ! levels. Some arrays with names (*8w) are at w (full) levels.
286 !----------------------------------------------------------------------
287 ! In WRF, kms (smallest number) is the bottom level and kme (largest
288 ! number) is the top level. In your scheme, if 1 is at the top level,
289 ! then you have to reverse the order in the k direction.
291 ! kme - half level (no data at this level)
292 ! kme ----- full level
294 ! kme-1 ----- full level
299 ! kms+2 ----- full level
301 ! kms+1 ----- full level
303 ! kms ----- full level
305 !======================================================================
308 ! Rho_d dry density (kg/m^3)
309 ! Theta_m moist potential temperature (K)
310 ! Qv water vapor mixing ratio (kg/kg)
311 ! Qc cloud water mixing ratio (kg/kg)
312 ! Qr rain water mixing ratio (kg/kg)
313 ! Qi cloud ice mixing ratio (kg/kg)
314 ! Qs snow mixing ratio (kg/kg)
315 ! Qg graupel mixing ratio (kg/kg)
316 ! Qh hail mixing ratio (kg/kg)
317 ! Qndrop droplet number mixing ratio (#/kg)
318 ! Qni cloud ice number concentration (#/kg)
319 ! Qns snow number concentration (#/kg)
320 ! Qnr rain number concentration (#/kg)
321 ! Qng graupel number concentration (#/kg)
322 ! Qnh hail number concentration (#/kg)
324 ! Qzr rain reflectivity (m6/kg)
325 ! Qzi ice reflectivity (m6/kg)
326 ! Qzs snow reflectivity (m6/kg)
327 ! Qzg graupel reflectivity (m6/kg)
328 ! Qzh hail reflectivity (m6/kg)
330 ! Qvolg graupel particle volume (m3/kg)
333 !----------------------------------------------------------------------
334 !-- th potential temperature (K)
335 !-- moist_new updated moisture array (kg/kg)
336 !-- moist_old Old moisture array (kg/kg)
337 !-- rho density of air (kg/m^3)
338 !-- pi_phy exner function (dimensionless)
340 !-- RAINNC grid scale precipitation (mm)
341 !-- RAINNCV one time step grid scale precipitation (mm/step)
342 !-- SNOWNC grid scale snow and ice (mm)
343 !-- SNOWNCV one time step grid scale snow and ice (mm/step)
344 !-- GRAUPELNC grid scale graupel (mm)
345 !-- GRAUPELNCV one time step grid scale graupel (mm/step)
346 !-- HAILNC grid scale hail (mm)
347 !-- HAILNCV one time step grid scale hail (mm/step)
348 !-- SR one time step mass ratio of snow to total precip
349 !-- z Height above sea level (m)
351 !-- G acceleration due to gravity (m/s^2)
352 !-- CP heat capacity at constant pressure for dry air (J/kg/K)
353 !-- R_d gas constant for dry air (J/kg/K)
354 !-- R_v gas constant for water vapor (J/kg/K)
355 !-- XLS latent heat of sublimation (J/kg)
356 !-- XLV latent heat of vaporization (J/kg)
357 !-- XLF latent heat of melting (J/kg)
358 !-- rhowater water density (kg/m^3)
359 !-- rhosnow snow density (kg/m^3)
360 !-- F_ICE_PHY Fraction of ice.
361 !-- F_RAIN_PHY Fraction of rain.
362 !-- F_RIMEF_PHY Mass ratio of rimed ice (rime factor)
363 !-- t8w temperature at layer interfaces
364 !-- cldfra, cldfra_old, current, previous cloud fraction
365 !-- exch_h vertical diffusivity (m2/s)
366 !-- qlsink Fractional cloud water sink (/s)
367 !-- precr rain precipitation rate at all levels (kg/m2/s)
368 !-- preci ice precipitation rate at all levels (kg/m2/s)
369 !-- precs snow precipitation rate at all levels (kg/m2/s)
370 !-- precg graupel precipitation rate at all levels (kg/m2/s) &
371 !-- P_QV species index for water vapor
372 !-- P_QC species index for cloud water
373 !-- P_QR species index for rain water
374 !-- P_QI species index for cloud ice
375 !-- P_QS species index for snow
376 !-- P_QG species index for graupel
377 !-- P_QH species index for hail
378 !-- P_QNDROP species index for cloud drop mixing ratio
379 !-- P_QNR species index for rain number concentration,
380 !-- P_QNI species index for cloud ice number concentration
381 !-- P_QNS species index for snow number concentration,
382 !-- P_QNG species index for graupel number concentration,
383 !-- P_QNH species index for hail number concentration,
384 !-- P_QZR species index for rain reflectivity
385 !-- P_QZI species index for ice reflectivity
386 !-- P_QZS species index for snow reflectivity
387 !-- P_QZG species index for graupel reflectivity
388 !-- P_QZH species index for hail reflectivity
389 !-- P_QVOLG species index for graupel particle volume,
390 !-- id grid id number
391 !-- ids start index for i in domain
392 !-- ide end index for i in domain
393 !-- jds start index for j in domain
394 !-- jde end index for j in domain
395 !-- kds start index for k in domain
396 !-- kde end index for k in domain
397 !-- ims start index for i in memory
398 !-- ime end index for i in memory
399 !-- jms start index for j in memory
400 !-- jme end index for j in memory
401 !-- kms start index for k in memory
402 !-- kme end index for k in memory
403 !-- i_start start indices for i in tile
404 !-- i_end end indices for i in tile
405 !-- j_start start indices for j in tile
406 !-- j_end end indices for j in tile
407 !-- its start index for i in tile
408 !-- ite end index for i in tile
409 !-- jts start index for j in tile
410 !-- jte end index for j in tile
411 !-- kts start index for k in tile
412 !-- kte end index for k in tile
413 !-- num_tiles number of tiles
414 !-- diagflag Logical to tell us when to produce diagnostics for history or restart
416 !======================================================================
417 INTEGER,parameter :: iunit=6
418 INTEGER :: mpi_error_code=1
420 TYPE(grid_config_rec_type), INTENT(IN ) , OPTIONAL :: config_flags
421 INTEGER, INTENT(IN ) :: mp_physics
422 LOGICAL, INTENT(IN ) :: specified
423 INTEGER, OPTIONAL, INTENT(IN ) :: chem_opt, progn
424 INTEGER, OPTIONAL, INTENT(IN ) :: hail, ice2 !, ccntype
426 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde
427 INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme,num_scalar
429 INTEGER, INTENT(IN ) :: num_sbmradar
430 INTEGER, INTENT(IN ) :: sbm_diagnostics
432 INTEGER, OPTIONAL, INTENT(IN ) :: ips,ipe, jps,jpe, kps,kpe
433 INTEGER, INTENT(IN ) :: kts,kte
434 INTEGER, INTENT(IN ) :: itimestep,num_tiles,spec_zone
435 INTEGER, DIMENSION(num_tiles), INTENT(IN) :: &
436 & i_start,i_end,j_start,j_end
438 LOGICAL, INTENT(IN ) :: warm_rain
440 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
445 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
452 !NUWRF JJS 20101021 vvvvv
453 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
454 INTENT(INOUT), OPTIONAL :: phys_tot, &
469 !NUWRF JJS 20101021 ^^^^^
470 !NUWRF JJS 20140225 vvvvv
471 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
472 INTENT(INOUT), OPTIONAL :: re_cloud_gsfc, &
478 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
481 precr3d, & ! rain precipitation rate at all levels (kg/m2/s)
482 preci3d, & ! ice precipitation rate at all levels (kg/m2/s)
483 precs3d, & ! snow precipitation rate at all levels (kg/m2/s)
484 precg3d, & ! graupel precipitation rate at all levels (kg/m2/s)
485 prech3d ! graupel precipitation rate at all levels (kg/m2/s)
486 !NUWRF JJS 20140225 ^^^^^
488 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),INTENT(INOUT), OPTIONAL :: th_old,qv_old
489 REAL,DIMENSION(ims:ime,kms:kme,jms:jme,num_scalar),INTENT(INOUT), OPTIONAL :: scalar
491 REAL, DIMENSION(ims:ime,kms:kme,jms:jme,num_sbmradar),INTENT(INOUT) :: sbmradar
493 INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(IN), OPTIONAL:: IVGTYP
494 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN), OPTIONAL :: XLAT, XLONG
497 !Data for CAMMGMP scheme
498 REAL,INTENT(IN), OPTIONAL ::accum_mode,aitken_mode,coarse_mode
499 !1D variables required for CAMMGMP scheme
500 REAL , DIMENSION( kms:kme ) , &
501 INTENT(IN ) , OPTIONAL :: fnm, & !Factors for interpolation at "w" grid (interfaces)
503 !2D variables required for CAMMGMP scheme
504 REAL, DIMENSION( ims:ime, jms:jme ), &
505 INTENT(IN), OPTIONAL :: &
506 qfx, & !Moisture flux at surface (kg m-2 s-1)
507 rliq !Vertically-integrated reserved cloud condensate(m/s)
510 integer, intent (in), optional :: multi_perturb
511 logical, intent (in), optional :: pert_thom
512 real, intent (in), optional :: pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, pert_thom_ni
513 real, dimension(ims:ime, kms:kme, jms:jme ), intent (in), optional :: perts_qvapor, perts_qcloud, perts_qice, &
514 perts_qsnow, perts_ni
515 real, dimension(:, :, :), allocatable :: qv_tmp, qc_tmp, qi_tmp, qs_tmp, qni_tmp
517 !3D variables required for CAMMGMP scheme
518 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
519 INTENT(IN), OPTIONAL :: &
520 dlf, & !Detraining cloud water tendendcy
521 dlf2, & !dq/dt due to export of cloud water into env by shal conv (kg/kg/s)
522 t_phy, & !Temprature at the mid points (K)
523 p_hyd, & !Hydrostatic pressure(Pa)
524 p8w_hyd, & !Hydrostatic Pressure at level interface (Pa)
525 z_at_mass, & !Height above sea level at grid cell center (m)
526 z_at_w, & !Height above sea level at layer interfaces (m)
527 tke_pbl, & !Turbulence kinetic energy
528 pblh, & !Planetary boundary layer height (m)
529 turbtype3d, & !Turbulent interface types [ no unit ]
530 smaw3d, & !Normalized Galperin instability function for momentum [no units]
531 alt, & !inverse density(m3/kg)
532 icwmrsh3d, & !Shallow cumulus in-cloud water mixing ratio (kg/m2)
533 icwmrdp3d, & !Deep Convection in-cloud water mixing ratio (kg/m2)
534 shfrc3d, & !Shallow cloud fraction
535 cmfmc3d, & !Deep + Shallow Convective mass flux [ kg /s/m^2 ]
536 cmfmc2_3d !Shallow convective mass flux [ kg/s/m^2 ]
537 #if ( WRF_CHEM == 1 )
538 !4D variables required for CAMMGMP scheme
539 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme,ntot_amode_cam_mam ), &
545 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
546 INTENT(INOUT) , OPTIONAL :: &
547 cldfra_old_mp, & !Old Cloud fraction for CAMMGMP microphysics only
549 lcd_old_mp !Old liquid cloud fraction
551 #if ( WRF_CHEM == 1 )
552 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem), &
554 chem !Chem array for CAMMGMP scheme Prognostic aerosols
557 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
558 INTENT(INOUT) , OPTIONAL:: &
559 wsedl3d, & !Sedimentation velocity of stratiform liquid cloud droplet (m/s)
560 cldfra_mp, & !Old Cloud fraction for CAMMGMP microphysics only
561 cldfra_mp_all, & !Old Cloud fraction for CAMMGMP microphysics only
562 cldfrai, & !Old Cloud fraction for CAMMGMP microphysics only
563 cldfral, & !Old Cloud fraction for CAMMGMP microphysics only
564 lradius, & !Old Cloud fraction for CAMMGMP microphysics only
565 iradius, & !Old Cloud fraction for CAMMGMP microphysics only
570 #if ( WRF_CHEM == 1 )
571 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
572 INTENT(INOUT), OPTIONAL :: &
573 qme3d, & !Net condensation rate (kg/kg/s)
574 prain3d, & !Rate of conversion of condensate to precipitation (kg/kg/s)
575 nevapr3d, & !Evaporation rate of rain + snow (kg/kg/s)
576 rate1ord_cw2pr_st3d !1st order rate for direct conversion of strat. cloud water to precip (1/s)
579 REAL, INTENT(INOUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
580 F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY
581 !!$#if ( WRF_CHEM == 1 )
582 ! REAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
583 REAL, OPTIONAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
585 !!$ REAL, DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
587 qlsink, & ! cloud water sink (/s)
588 precr, & ! rain precipitation rate at all levels (kg/m2/s)
589 preci, & ! ice precipitation rate at all levels (kg/m2/s)
590 precs, & ! snow precipitation rate at all levels (kg/m2/s)
591 precg ! graupel precipitation rate at all levels (kg/m2/s)
595 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN) :: XLAND
596 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN), OPTIONAL :: SNOWH
598 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(OUT) :: SR
600 REAL, INTENT(IN ) :: dt,dx,dy
602 INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: LOWLYR
607 REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: refl_10cm
608 REAL, OPTIONAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: & ! for ntu3m
609 qdcn_curr,qtcn_curr,qccn_curr,qrcn_curr,qnin_curr, & ! for ntu3m
610 fi_curr,fs_curr,vi_curr,vs_curr,vg_curr,ai_curr, & ! for ntu3m
611 as_curr,ag_curr,ah_curr,i3m_curr ! for ntu3m
612 LOGICAL, OPTIONAL :: f_qdcn,f_qtcn,f_qccn,f_qrcn,f_qnin,f_fi,f_fs, & ! for ntu3m
613 f_vi,f_vs,f_vg,f_ai,f_as,f_ag,f_ah,f_i3m ! for ntu3m
614 REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: vmi3d,di3d,rhopo3d, & ! for P3
615 vmi3d_2,di3d_2,rhopo3d_2, & ! for P3
616 phii3d, & ! for Jensen ISHMAEL
617 phii3d_2, & ! for Jensen ISHMAEL
618 vmi3d_3,di3d_3,rhopo3d_3, & ! for Jensen ISHMAEL
619 phii3d_3, & ! for Jensen ISHMAEL
620 itype,itype_2,itype_3 ! for Jensen ISHMAEL
621 LOGICAL, OPTIONAL, INTENT(IN ) :: channel_switch
622 REAL, OPTIONAL, INTENT(INOUT ) :: naer ! aerosol number concentration (/kg)
623 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) , OPTIONAL :: qnwfa2d, qnifa2d, qnbca2d, &
625 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
629 ,cldfra, cldfra_old, exch_h &
630 ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr &
631 ,qt_curr,qndrop_curr,qni_curr,qh_curr,qnh_curr &
632 ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr &
633 ,qic_curr,qip_curr,qid_curr &
634 ,qnic_curr,qnip_curr,qnid_curr &
635 ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr &
636 ,qir_curr,qib_curr & ! for P3
637 ,qi2_curr,qni2_curr,qir2_curr,qib2_curr & ! for P3
638 ,qvoli_curr,qaoli_curr & ! for Jensen ISHMAEL
639 ,qvoli2_curr,qaoli2_curr & ! for Jensen ISHMAEL
640 ,qi3_curr,qni3_curr,qvoli3_curr,qaoli3_curr & ! for Jensen ISHMAEL
641 ,effr_curr,ice_effr_curr,tot_effr_curr &
642 ,qic_effr_curr,qip_effr_curr,qid_effr_curr &
643 ,kext_ql,kext_qs,kext_qg &
645 ,kext_qic,kext_qip,kext_qid,tempc,height &
646 ,kext_ft_qic,kext_ft_qip,kext_ft_qid &
647 ,kext_ft_qs,kext_ft_qg &
648 ,qnwfa_curr,qnifa_curr,qnbca_curr & ! Added by G. Thompson
649 ,qvolg_curr,qvolh_curr, qrimef_curr
651 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
653 INTENT(IN) :: qrcuten, qscuten, qicuten, qccuten
654 INTEGER, INTENT(IN), optional :: cu_used
655 #if ( WRF_CHEM == 1 )
656 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
657 INTENT(INOUT) :: rainprod, evapprod
658 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
659 INTENT(INOUT) :: qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp
662 ! Added RI_CURR similar to microphysics fields above
663 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
665 INTENT(INOUT) :: ri_curr
668 REAL, DIMENSION(ims:ime, kms:kme, jms:jme ), &
674 REAL, DIMENSION( ims:ime , jms:jme ), &
687 ! NUWRF JJS 20110525 vvvvv
688 ! for inline Gocart coupling
690 INTEGER, PARAMETER :: num_go = 14 ! number of the gocart aerosol species
691 REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_go) :: aero
692 REAL, DIMENSION( ims:ime, kms:kme, jms:jme), INTENT(OUT) :: icn_diag
693 REAL, DIMENSION( ims:ime, kms:kme, jms:jme), INTENT(OUT) :: nc_diag
694 integer, intent(in) :: gsfcgce_gocart_coupling ! EMK
695 REAL, PARAMETER :: frac(4)=(/ 0.01053,0.08421,0.25263,0.65263 /) !fraction for fine dust
697 ! NUWRF JJS 20110525 ^^^^^
702 INTEGER,OPTIONAL,INTENT(IN ) :: id
704 REAL , DIMENSION( ims:ime , jms:jme ) , OPTIONAL , &
707 REAL, DIMENSION (:), OPTIONAL, INTENT(INOUT) :: mp_restart_state &
708 ,tbpvs_state,tbpvs0_state
711 LOGICAL, OPTIONAL :: f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni,f_qt &
712 ,f_qns,f_qnr,f_qng,f_qnn,f_qnc,f_qh,f_qnh,f_qzr &
713 ,f_effr,f_ice_effr,f_tot_effr &
714 ,f_qic_effr,f_qip_effr,f_qid_effr &
716 ,f_qnic,f_qnip,f_qnid &
717 ,f_qzi,f_qzs,f_qzg,f_qzh,f_qvolg,f_qvolh &
719 ,f_qir,f_qib & ! for P3
720 ,f_qi2,f_qni2,f_qir2,f_qib2 & ! for P3
721 ,f_qvoli,f_qaoli & ! for Jensen ISHMAEL
722 ,f_qvoli2,f_qaoli2 & ! for Jensen ISHMAEL
723 ,f_qi3,f_qni3,f_qvoli3,f_qaoli3 & ! for Jensen ISHMAEL
724 ,f_qnwfa, f_qnifa, f_qnbca ! Added by G. Thompson
727 LOGICAL, OPTIONAL, INTENT(IN) :: diagflag
728 INTEGER, OPTIONAL, INTENT(IN) :: ke_diag ! tells reflectivity calculation whether to do full depth or only k=1
729 REAL, INTENT(IN) :: ccn_conc ! RAS
730 INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref
731 REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: & ! G. Thompson
732 re_cloud, re_ice, re_snow
733 INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs
735 INTEGER, INTENT(IN ) :: aercu_opt
737 INTEGER, OPTIONAL, INTENT(IN ) :: PBL
738 INTEGER, INTENT(IN ) :: no_src_types_cu
739 REAL, INTENT(IN ) :: aercu_fct
740 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme, no_src_types_cu), INTENT(INOUT) &
742 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme), INTENT(INOUT) &
758 REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme), INTENT(INOUT) &
760 REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: mskf_refl_10cm
763 ! REAL , DIMENSION( ims:ime , jms:jme ), OPTIONAL, INTENT(INOUT) :: lwp
767 INTEGER :: i,j,k,its,ite,jts,jte,ij,sz,n
769 LOGICAL :: nssl_progn = .false.
770 REAL :: z0, z1, z2, w1, w2
772 integer, parameter :: ntot = 50
777 REAL, DIMENSION( ims:ime , jms:jme ), OPTIONAL, INTENT(IN):: IRRIGATION !ARI
778 REAL, OPTIONAL, INTENT(IN):: irr_daily_amount, julian_in, xtime, gmt
779 INTEGER, OPTIONAL, INTENT(IN ):: sf_surf_irr_scheme, irr_start_hour, irr_num_hours, &
780 irr_start_julianday,irr_end_julianday,irr_freq,irr_ph
781 REAL, PARAMETER :: PI_GRECO=3.14159
782 INTEGER :: end_hour,a,b,xt24,irr_day,timing
783 REAL :: constants_irrigation,tloc,irr_start,phase
784 INTEGER, OPTIONAL, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: irr_rand_field
786 !---------------------------------------------------------------------
787 ! check for microphysics type. We need a clean way to
788 ! specify these things!
789 !---------------------------------------------------------------------
792 IF ( PRESENT ( channel_switch ) ) channel = channel_switch
794 if (mp_physics .eq. 0) return
801 ! set this to true to print out the global max/min for W on each time step.
803 wmax = maxval( w(ips:ipe,kps:kpe,jps:jpe) )
804 wmin = minval( w(ips:ipe,kps:kpe,jps:jpe) )
805 #if ( defined(DM_PARALLEL) && ! defined(STUBMPI) )
806 wmax = wrf_dm_max_real ( wmax )
807 wmin = wrf_dm_min_real ( wmin )
809 WRITE( wrf_err_message , * ) 'microphysics_driver: GLOBAL w max/min = ', wmax, wmin
810 CALL wrf_message ( wrf_err_message )
813 #ifdef XEON_OPTIMIZED_WSM5
814 ! the OpenMP loops are inside the scheme when running on MIC
815 IF ( mp_physics .EQ. WSM5SCHEME ) THEN
820 its = max(ips,ids+sz)
821 ite = min(ipe,ide-1-sz)
823 jts = max(jps,jds+sz)
824 jte = min(jpe,jde-1-sz)
833 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
834 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
835 ,RD=r_d,RV=r_v,T0C=svpt0 &
836 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
837 ,XLS=xls, XLV0=xlv, XLF0=xlf &
838 ,DEN0=rhoair0, DENR=rhowater &
839 ,CLIQ=cliq,CICE=cice,PSAT=psat &
840 ,RAIN=rainnc ,RAINNCV=rainncv &
841 ,SNOW=snownc ,SNOWNCV=snowncv &
843 ,REFL_10CM=refl_10cm &
845 ,do_radar_ref=do_radar_ref &
846 ,has_reqc=has_reqc & ! for radiation +
851 ,re_snow=re_snow & ! for radiation -
852 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
853 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
854 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
861 !$OMP PRIVATE ( ij, its, ite, jts, jte, i,j,k,n )
863 DO ij = 1 , num_tiles
865 its = max(i_start(ij),ids)
866 ite = min(i_end(ij),ide-1)
868 its = max(i_start(ij),ids+sz)
869 ite = min(i_end(ij),ide-1-sz)
871 jts = max(j_start(ij),jds+sz)
872 jte = min(j_end(ij),jde-1-sz)
875 sf_surf_irr: SELECT CASE(sf_surf_irr_scheme)
877 CALL sprinkler_irrigation( julian_in &
878 & ,irrigation, irr_daily_amount,rho,dz8w &
879 & ,irr_start_hour,irr_num_hours,irr_start_julianday &
880 & ,irr_end_julianday,irr_freq,irr_ph,qr_curr &
881 & ,gmt,xtime,dt,irr_rand_field &
882 & ,ids,ide, jds,jde & ! domain dims
883 & ,ims,ime, jms,jme, kms,kme & ! memory dims
884 & ,its,ite, jts,jte )
885 END SELECT sf_surf_irr
890 ! 2009-06009 rce - zero all these for safety
891 IF( PRESENT(qlsink) ) qlsink(its:ite,kts:kte,jts:jte) = 0.
892 IF( PRESENT(precr ) ) precr(its:ite,kts:kte,jts:jte) = 0.
893 IF( PRESENT(preci ) ) preci(its:ite,kts:kte,jts:jte) = 0.
894 IF( PRESENT(precs ) ) precs(its:ite,kts:kte,jts:jte) = 0.
895 IF( PRESENT(precg ) ) precg(its:ite,kts:kte,jts:jte) = 0.
898 IF( PRESENT(chem_opt) .AND. PRESENT(progn) ) THEN
900 ! ERM: check whether to use built-in droplet nucleation or use qndrop from CHEM
901 IF ( mp_physics==NSSL_2MOMCCN .or. mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG ) THEN
902 IF ( progn > 0 ) THEN
903 IF ( .not. (chem_opt == 0 .or. chem_opt == 401) ) nssl_progn = .true.
905 nssl_progn = .false. ! use NUCOND for droplet nucleation
909 !Add pass for dust-only wrf-chem option - RAS
910 IF( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==LINSCHEME .OR. mp_physics==MORR_TWO_MOMENT)) THEN
911 IF( PRESENT( QNDROP_CURR ) ) THEN
912 CALL wrf_debug ( 100 , 'microphysics_driver: calling prescribe_aerosol_mixactivate' )
913 ! 06-nov-2005 rce - id & itimestep added to arg list
914 call prescribe_aerosol_mixactivate ( &
915 id, itimestep, dt, naer, &
916 ccn_conc, chem_opt, & !RAS13.1
917 rho, th, pi_phy, w, cldfra, cldfra_old, &
918 z, dz8w, p8w, t8w, exch_h, &
919 qv_curr, qc_curr, qi_curr, qndrop_curr, &
921 ids,ide, jds,jde, kds,kde, &
922 ims,ime, jms,jme, kms,kme, &
923 its,ite, jts,jte, kts,kte, &
924 F_QC=f_qc, F_QI=f_qi )
926 ELSEIF ( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==NSSL_2MOMCCN .or. &
927 mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG)) THEN
928 ! Do nothing here for the moment. Use activation of CCN within the NSSL_2MOM scheme instead, based on nssl_cccn namelist value.
929 ELSEIF ( progn==1 .AND. mp_physics/=LINSCHEME .AND. mp_physics/=MORR_TWO_MOMENT &
930 .AND. mp_physics/=NSSL_2MOM .AND. mp_physics/=NSSL_2MOMCCN .AND. mp_physics/=NSSL_2MOMG ) THEN
931 call wrf_error_fatal( &
932 "SETTINGS ERROR: Prognostic cloud droplet number can only be used with the mp_physics=LINSCHEME or MORRISON or NSSL_2MOM.")
937 !NUWRF JJS 20110525 vvvvv
938 ! Pack gocart aerosol species
939 ! All aerosol species in chem are in "ug/kg-dryair"
940 ! and conerted to (g/m**3)
946 aero(i,k,j, 1) = max(0.0, chem(i,k,j,p_sulf)*1.0e-6*p(i,k,j)* &
947 96.0/(8.314*th(i,k,j)*pi_phy(i,k,j))) ! 1 = SO4
948 aero(i,k,j, 2) = max(0.0, (chem(i,k,j,p_bc1)+chem(i,k,j,p_bc2))*1.0e-6*rho(i,k,j)) ! 2 = BC1+BC2
949 aero(i,k,j, 3) = max(0.0, chem(i,k,j,p_oc1)*1.0e-6*rho(i,k,j)*1.4e0) ! 3 = OC1
950 aero(i,k,j, 4) = max(0.0, chem(i,k,j,p_oc2)*1.0e-6*rho(i,k,j)*1.4e0) ! 4 = OC2
951 aero(i,k,j, 5) = max(0.0, chem(i,k,j,p_seas_1)*1.0e-6*rho(i,k,j)) ! 5 = SS1
952 aero(i,k,j, 6) = max(0.0, (chem(i,k,j,p_seas_2)+chem(i,k,j,p_seas_3)+ &
953 chem(i,k,j,p_seas_4))*1.0e-6*rho(i,k,j)) ! 6 = SS2+SS3+SS4
954 aero(i,k,j, 7) = max(0.0, chem(i,k,j,p_dust_1)*1.0e-6*rho(i,k,j)*frac(1)) ! 7 = DU1 dust mode 1
955 aero(i,k,j, 8) = max(0.0, chem(i,k,j,p_dust_1)*1.0e-6*rho(i,k,j)*frac(2)) ! 8 = DU1 dust mode 2
956 aero(i,k,j, 9) = max(0.0, chem(i,k,j,p_dust_1)*1.0e-6*rho(i,k,j)*frac(3)) ! 9 = DU1 dust mode 3
957 aero(i,k,j,10) = max(0.0, chem(i,k,j,p_dust_1)*1.0e-6*rho(i,k,j)*frac(4)) ! 10 = DU1 dust mode 4
958 aero(i,k,j,11) = max(0.0, chem(i,k,j,p_dust_2)*1.0e-6*rho(i,k,j)) ! 11 = DU2 dust mode 5
959 aero(i,k,j,12) = max(0.0, chem(i,k,j,p_dust_3)*1.0e-6*rho(i,k,j)) ! 11 = DU3 dust mode 6
960 aero(i,k,j,13) = max(0.0, chem(i,k,j,p_dust_4)*1.0e-6*rho(i,k,j)) ! 11 = DU4 dust mode 7
961 aero(i,k,j,14) = max(0.0, chem(i,k,j,p_dust_5)*1.0e-6*rho(i,k,j)) ! 11 = DU5 dust mode 8
965 !NUWRF JJS 20110525 ^^^^^
968 micro_select: SELECT CASE(mp_physics)
971 CALL wrf_debug ( 100 , 'microphysics_driver: calling kessler' )
972 IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND. &
973 PRESENT( QR_CURR ) .AND. &
974 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
981 ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp &
982 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
983 ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater &
985 ,RAINNC=rainnc,RAINNCV=rainncv &
986 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
987 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
988 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
991 CALL wrf_error_fatal ( 'arguments not present for calling kessler' )
994 CASE (MKESSLERSCHEME)
995 CALL wrf_debug ( 100 , 'microphysics_driver: calling mkessler' )
996 IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND. &
997 PRESENT( QR_CURR ) .AND. &
998 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
1005 !whl P is not recomputed in the HL' Kessler; need be added here
1008 ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp &
1009 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
1010 ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater &
1012 ,RAINNC=rainnc,RAINNCV=rainncv &
1013 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1014 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1015 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1018 CALL wrf_error_fatal ( 'arguments not present for calling mkessler' )
1023 if (pert_thom .and. multi_perturb == 1) then
1024 allocate (qv_tmp(its:ite, kts:kte, jts:jte))
1025 allocate (qc_tmp(its:ite, kts:kte, jts:jte))
1026 allocate (qi_tmp(its:ite, kts:kte, jts:jte))
1027 allocate (qs_tmp(its:ite, kts:kte, jts:jte))
1028 allocate (qni_tmp(its:ite, kts:kte, jts:jte))
1030 call Add_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1031 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1032 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1033 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1036 CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )
1037 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1038 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1039 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1040 PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND. &
1041 PRESENT( QNC_CURR) .AND. PRESENT ( QNWFA_CURR) .AND. &
1042 PRESENT( QNIFA_CURR).AND.PRESENT ( QNWFA2D) .AND. &
1043 PRESENT( QNIFA2D) .AND. &
1044 PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND. &
1045 PRESENT( GRAUPELNC).AND. PRESENT ( GRAUPELNCV) .AND. &
1046 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
1047 #if ( WRF_CHEM == 1 )
1048 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
1049 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
1050 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
1051 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
1053 CALL mp_gt_driver( &
1069 aer_init_opt=config_flags%aer_init_opt, &
1070 wif_input_opt=config_flags%wif_input_opt, &
1077 ITIMESTEP=itimestep, &
1082 GRAUPELNC=GRAUPELNC, &
1083 GRAUPELNCV=GRAUPELNCV, &
1085 #if ( WRF_CHEM == 1 )
1086 WETSCAV_ON=config_flags%wetscav_onoff == 1, &
1087 RAINPROD=rainprod, &
1088 EVAPPROD=evapprod, &
1090 REFL_10CM=refl_10cm, &
1091 diagflag=diagflag, &
1092 ke_diag = ke_diag, &
1093 do_radar_ref=do_radar_ref, &
1094 re_cloud=re_cloud, &
1097 has_reqc=has_reqc, & ! G. Thompson
1098 has_reqi=has_reqi, & ! G. Thompson
1099 has_reqs=has_reqs, & ! G. Thompson
1100 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1101 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1102 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
1104 if (pert_thom .and. multi_perturb == 1) then
1105 call Remove_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1106 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1107 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1108 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1113 deallocate (qni_tmp)
1116 IF (config_flags%aer_fire_emit_opt.gt.0) then
1117 CALL wrf_debug ( 200 , ' call fire_emis_simple_plumerise' )
1118 CALL fire_emis_simple_plumerise (config_flags%wif_fire_inj, config_flags%aer_fire_emit_opt &
1119 ,z_at_mass, pblh, qnwfa_curr, qnbca_curr &
1120 ,qnocbb2d, qnbcbb2d, dt, ids, ide, jds, jde, kds, kde &
1121 ,ims, ime, jms, jme, kms, kme, its, ite, jts, jte, kts, kte )
1124 CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
1128 CALL wrf_debug ( 100 , 'microphysics_driver: calling thompsongh' )
1129 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1130 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1131 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1132 PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND. &
1133 PRESENT( QNG_CURR) .AND. PRESENT ( QVOLG_CURR) .AND. &
1134 PRESENT( QNC_CURR) .AND. PRESENT ( QNWFA_CURR) .AND. &
1135 PRESENT( QNIFA_CURR).AND.PRESENT ( QNWFA2D) .AND. &
1136 PRESENT( QNIFA2D) .AND. &
1137 PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND. &
1138 PRESENT( GRAUPELNC).AND. PRESENT ( GRAUPELNCV) .AND. &
1139 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
1140 #if ( WRF_CHEM == 1 )
1141 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
1142 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
1143 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
1144 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
1146 CALL mp_gt_driver( &
1164 aer_init_opt=config_flags%aer_init_opt, &
1165 wif_input_opt=config_flags%wif_input_opt, &
1172 ITIMESTEP=itimestep, &
1177 GRAUPELNC=GRAUPELNC, &
1178 GRAUPELNCV=GRAUPELNCV, &
1180 #if ( WRF_CHEM == 1 )
1181 WETSCAV_ON=config_flags%wetscav_onoff == 1, &
1182 RAINPROD=rainprod, &
1183 EVAPPROD=evapprod, &
1185 REFL_10CM=refl_10cm, &
1186 diagflag=diagflag, &
1187 ke_diag = ke_diag, &
1188 do_radar_ref=do_radar_ref, &
1189 re_cloud=re_cloud, &
1192 has_reqc=has_reqc, & ! G. Thompson
1193 has_reqi=has_reqi, & ! G. Thompson
1194 has_reqs=has_reqs, & ! G. Thompson
1195 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1196 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1197 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
1199 CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
1203 CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )
1204 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1205 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1206 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1207 PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND. &
1208 ! PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND. &
1209 ! PRESENT( GRAUPELNC) .AND. PRESENT ( GRAUPELNCV) .AND. &
1210 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
1211 #if ( WRF_CHEM == 1 )
1212 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
1213 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
1214 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
1215 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
1217 if (pert_thom .and. multi_perturb == 1) then
1218 allocate (qv_tmp(its:ite, kts:kte, jts:jte))
1219 allocate (qc_tmp(its:ite, kts:kte, jts:jte))
1220 allocate (qi_tmp(its:ite, kts:kte, jts:jte))
1221 allocate (qs_tmp(its:ite, kts:kte, jts:jte))
1222 allocate (qni_tmp(its:ite, kts:kte, jts:jte))
1224 call Add_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1225 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1226 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1227 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1230 CALL mp_gt_driver( &
1245 ITIMESTEP=itimestep, &
1250 GRAUPELNC=GRAUPELNC, &
1251 GRAUPELNCV=GRAUPELNCV, &
1253 #if ( WRF_CHEM == 1 )
1254 WETSCAV_ON=config_flags%wetscav_onoff == 1, &
1255 RAINPROD=rainprod, &
1256 EVAPPROD=evapprod, &
1258 REFL_10CM=refl_10cm, &
1259 diagflag=diagflag, &
1260 ke_diag = ke_diag, &
1261 do_radar_ref=do_radar_ref, &
1262 re_cloud=re_cloud, & ! G. Thompson
1263 re_ice=re_ice, & ! G. Thompson
1264 re_snow=re_snow, & ! G. Thompson
1265 has_reqc=has_reqc, & ! G. Thompson
1266 has_reqi=has_reqi, & ! G. Thompson
1267 has_reqs=has_reqs, & ! G. Thompson
1268 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1269 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1270 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
1272 if (pert_thom .and. multi_perturb == 1) then
1273 call Remove_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1274 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1275 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1276 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1281 deallocate (qni_tmp)
1285 CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
1289 CALL wrf_debug(100, 'microphysics_driver: calling ntu')
1290 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1291 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1292 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1293 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV )) THEN ! ....
1294 CALL mp_ntu(ITIMESTEP=itimestep,TH=th,P=p,DZ=dz8w, &
1295 W=w,PII=pi_phy,DT_MP=dt,SR=sr,QV=qv_curr, &
1296 QC=qc_curr,QR=qr_curr,QI=qi_curr,QS=qs_curr, &
1297 QG=qg_curr,QH=qh_curr,NC=qnc_curr,NR=qnr_curr, &
1298 NI=qni_curr,NS=qns_curr,NG=qng_curr, &
1299 NH=qnh_curr,QDCN=qdcn_curr,QTCN=qtcn_curr, &
1300 QCCN=qccn_curr,QRCN=qrcn_curr,QNIN=qnin_curr, &
1301 FI=fi_curr,FS=fs_curr,VI=vi_curr,VS=vs_curr, &
1302 VG=vg_curr,AI=ai_curr,AS=as_curr,AG=ag_curr, &
1303 AH=ah_curr,I3M=i3m_curr,RAINNC=rainnc, &
1304 RAINNCV=rainncv,SNOWNC=snownc,SNOWNCV=snowncv, &
1305 GRAPNC=graupelnc,GRAPNCV=graupelncv, &
1306 HAILNC=hailnc,HAILNCV=hailncv, &
1307 IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde, &
1308 IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme, &
1309 ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte)
1311 Call wrf_error_fatal( 'arguments not present for calling ntu')
1315 # if ( BUILD_SBM_FAST == 1 )
1316 CASE (FAST_KHAIN_LYNN_SHPUND)
1317 CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )
1318 CALL fast_sbm(W=w,U=u,V=v,TH_OLD=th_old &
1319 ,CHEM_new=scalar,N_CHEM=num_scalar &
1320 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy &
1321 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p &
1322 ,PI_PHY=pi_phy,TH_PHY=th &
1323 ,xland=xland,domain_id=id &
1340 ,sbmradar=sbmradar,num_sbmradar=num_sbmradar &
1341 ,sbm_diagnostics=sbm_diagnostics &
1342 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1343 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1344 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1345 ,diagflag=diagflag & ! added for radar reflectivity
1350 ,GRAUPELNC=graupelnc &
1351 ,GRAUPELNCV=graupelncv &
1357 CASE (FULL_KHAIN_LYNN)
1358 CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )
1359 CALL sbm(W=w,U=u,V=v,TH_OLD=th_old &
1360 ,CHEM_new=scalar,N_CHEM=num_scalar &
1361 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy &
1362 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
1387 ,ICE_EFFR=ice_effr_curr &
1388 ,TOT_EFFR=tot_effr_curr &
1389 ,QIC_EFFR=qic_effr_curr &
1390 ,QIP_EFFR=qip_effr_curr &
1391 ,QID_EFFR=qid_effr_curr &
1399 ,kext_qic=kext_qic &
1400 ,kext_qip=kext_qip &
1401 ,kext_qid=kext_qid &
1402 ,kext_ft_qic=kext_ft_qic &
1403 ,kext_ft_qip=kext_ft_qip &
1404 ,kext_ft_qid=kext_ft_qid &
1405 ,kext_ft_qs=kext_ft_qs &
1406 ,kext_ft_qg=kext_ft_qg &
1407 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1408 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1409 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1410 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
1411 ,diagflag=diagflag & ! added for radar reflectivity
1412 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
1417 ,GRAUPELNC=graupelnc &
1418 ,GRAUPELNCV=graupelncv &
1426 CASE (JENSEN_ISHMAEL)
1427 CALL wrf_debug(100, 'microphysics_driver: jensen_ishmael ')
1428 IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1429 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
1430 PRESENT (QI_CURR).AND. PRESENT (QNI_CURR) .AND. &
1431 PRESENT (QVOLI_CURR) .AND. PRESENT (QAOLI_CURR) .AND. &
1432 PRESENT (QI2_CURR).AND. PRESENT (QNI2_CURR) .AND. &
1433 PRESENT (QVOLI2_CURR) .AND. PRESENT (QAOLI2_CURR) .AND. &
1434 PRESENT (QI3_CURR).AND. PRESENT (QNI3_CURR) .AND. &
1435 PRESENT (QVOLI3_CURR).AND. PRESENT (QAOLI3_CURR)) THEN
1436 CALL mp_jensen_ishmael( &
1437 ITIMESTEP=itimestep, & !*
1448 AI1=qvoli_curr, & !*
1449 CI1=qaoli_curr, & !*
1452 AI2=qvoli2_curr, & !*
1453 CI2=qaoli2_curr, & !*
1456 AI3=qvoli3_curr, & !*
1457 CI3=qaoli3_curr, & !*
1458 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1459 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1460 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte, &
1465 diag_effc3d=re_cloud, &
1466 diag_effi3d=re_ice, &
1467 diag_dbz3d=refl_10cm, &
1468 diag_vmi3d_1=vmi3d, &
1470 diag_rhopo3d_1=rhopo3d, &
1471 diag_phii3d_1=phii3d, &
1472 diag_vmi3d_2=vmi3d_2, &
1473 diag_di3d_2=di3d_2, &
1474 diag_rhopo3d_2=rhopo3d_2, &
1475 diag_phii3d_2=phii3d_2, &
1476 diag_vmi3d_3=vmi3d_3, &
1477 diag_di3d_3=di3d_3, &
1478 diag_rhopo3d_3=rhopo3d_3, &
1479 diag_phii3d_3=phii3d_3, &
1480 diag_itype_1=itype, &
1481 diag_itype_2=itype_2, &
1482 diag_itype_3=itype_3 &
1485 Call wrf_error_fatal( 'arguments not present for calling jensen_ishamel')
1488 CASE (MORR_TWO_MOMENT)
1489 CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment')
1490 IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1491 PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1492 PRESENT (QS_CURR) .AND. PRESENT (QG_CURR) .AND. &
1493 PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1494 PRESENT (QNS_CURR) .AND. PRESENT (QNI_CURR).AND. &
1495 PRESENT (QNR_CURR) .AND. PRESENT (QNG_CURR).AND. &
1496 PRESENT (QSCUTEN).AND. &
1497 PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1498 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1499 PRESENT ( W ) ) THEN
1500 CALL mp_morr_two_moment( &
1501 ITIMESTEP=itimestep, & !*
1510 NS=qns_curr, & !* ! VVT
1511 NR=qnr_curr, & !* ! VVT
1512 NG=qng_curr, & !* ! VVT
1521 ,RAINNCV=RAINNCV & !*
1523 ,SNOWNCV=SNOWNCV & !*
1524 ,GRAUPELNC=GRAUPELNC & !*
1525 ,GRAUPELNCV=GRAUPELNCV & !*
1527 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
1528 ,diagflag=diagflag & ! added for radar reflectivity
1529 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
1530 ,qrcuten=qrcuten & ! hm
1531 ,qscuten=qscuten & ! hm
1532 ,qicuten=qicuten & ! hm
1533 ,F_QNDROP=f_qndrop & ! hm for wrf-chem
1534 ,QNDROP=qndrop_curr & ! hm for wrf-chem
1535 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1536 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1537 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1538 ,QLSINK=qlsink & ! jdf for wrf-chem
1539 #if ( WRF_CHEM == 1 )
1540 ,WETSCAV_ON=config_flags%wetscav_onoff == 1 &
1541 ,EVAPPROD=evapprod,RAINPROD=rainprod &
1543 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & ! jdf for wrf-chem
1546 Call wrf_error_fatal( 'arguments not present for calling morrison two moment')
1551 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category')
1552 ! IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1553 ! PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1554 ! PRESENT (QNG_CURR) .AND. &
1555 ! PRESENT (QNC_CURR) .AND. PRESENT (QNI_CURR).AND. &
1556 ! PRESENT (QNR_CURR) .AND. &
1557 ! PRESENT (QSCUTEN).AND. &
1558 ! PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1559 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1560 ! PRESENT (Z ) .AND.PRESENT ( W ) ) THEN
1562 CALL mp_p3_wrapper_wrf( &
1563 ITIMESTEP=itimestep, &
1586 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1587 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1588 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1589 ,diag_zdbz_3d=refl_10cm, &
1590 diag_effc_3d=re_cloud, &
1591 diag_effi_3d=re_ice &
1592 ,diag_vmi_3d=vmi3d &
1594 ,diag_rhopo_3d=rhopo3d &
1597 ! Call wrf_error_fatal( 'arguments not present for calling p3 one category')
1600 CASE (P3_1CATEGORY_NC)
1601 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category')
1602 ! IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1603 ! PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1604 ! PRESENT (QNG_CURR) .AND. &
1605 ! PRESENT (QNC_CURR) .AND. PRESENT (QNI_CURR).AND. &
1606 ! PRESENT (QNR_CURR) .AND. &
1607 ! PRESENT (QSCUTEN).AND. &
1608 ! PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1609 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1610 ! PRESENT (Z ) .AND.PRESENT ( W ) ) THEN
1612 CALL mp_p3_wrapper_wrf( &
1613 ITIMESTEP=itimestep, &
1637 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1638 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1639 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1640 ,diag_zdbz_3d=refl_10cm, &
1641 diag_effc_3d=re_cloud, &
1642 diag_effi_3d=re_ice &
1643 ,diag_vmi_3d=vmi3d &
1645 ,diag_rhopo_3d=rhopo3d &
1648 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category')
1649 ! IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1650 ! PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1651 ! PRESENT (QNG_CURR) .AND. &
1652 ! PRESENT (QNC_CURR) .AND. PRESENT (QNI_CURR).AND. &
1653 ! PRESENT (QNR_CURR) .AND. &
1654 ! PRESENT (QSCUTEN).AND. &
1655 ! PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1656 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1657 ! PRESENT (Z ) .AND.PRESENT ( W ) ) THEN
1659 CALL mp_p3_wrapper_wrf_2cat( &
1660 ITIMESTEP=itimestep, &
1671 QIR2_3d=qir2_curr, &
1672 QNI2_3d=qni2_curr, &
1673 QIB2_3d=qib2_curr, &
1688 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1689 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1690 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1691 ,diag_zdbz_3d=refl_10cm, &
1692 diag_effc_3d=re_cloud, &
1693 diag_effi_3d=re_ice &
1694 ,diag_vmi_3d=vmi3d &
1696 ,diag_rhopo_3d=rhopo3d &
1697 ,diag_vmi2_3d=vmi3d_2 &
1698 ,diag_di2_3d=di3d_2 &
1699 ,diag_rhopo2_3d=rhopo3d_2 &
1703 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category 3 moment')
1705 CALL mp_p3_wrapper_wrf( &
1706 ITIMESTEP=itimestep, &
1730 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1731 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1732 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1733 ,diag_zdbz_3d=refl_10cm, &
1734 diag_effc_3d=re_cloud, &
1735 diag_effi_3d=re_ice &
1736 ,diag_vmi_3d=vmi3d &
1738 ,diag_rhopo_3d=rhopo3d &
1740 ! not currently output
1741 ! ,diag_dhmax_3d=dhmax3d &
1742 ! ,diag_lami_3d=lami3d &
1743 ! ,diag_mui_3d=mui3d &
1751 CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment')
1752 CALL mp_morr_two_moment_aero( &
1753 ITIMESTEP=itimestep, & !*
1762 NS=qns_curr, & !* ! VVT
1763 NR=qnr_curr, & !* ! VVT
1764 NG=qng_curr, & !* ! VVT
1765 NC=qnc_curr, & ! TWG/amy added nc
1766 KZH=exch_h, & ! TWG/amy add
1775 ,RAINNCV=RAINNCV & !*
1777 ,SNOWNCV=SNOWNCV & !*
1778 ,GRAUPELNC=GRAUPELNC & !*
1779 ,GRAUPELNCV=GRAUPELNCV & !*
1781 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
1782 ,MSKF_REFL_10CM=MSKF_REFL_10CM & ! addef for radar reflectivity TWG 2017
1783 ,diagflag=diagflag & ! added for radar reflectivity
1784 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
1785 ,qrcuten=qrcuten & ! hm
1786 ,qscuten=qscuten & ! hm
1787 ,qicuten=qicuten & ! hm
1788 ,F_QNDROP=f_qndrop & ! hm for wrf-chem
1789 ,QNDROP=qndrop_curr & ! hm for wrf-chem
1790 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1791 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1792 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1793 ,PBL=PBL & ! TWG/amy add
1794 ,aerocu=aerocu & ! TWG add
1795 ,aercu_opt=aercu_opt & ! TWG add
1796 ,aercu_fct=aercu_fct & ! TWG add
1797 ,no_src_types_cu=no_src_types_cu & ! TWG add
1798 ,EFCG=EFCG & ! TWG add
1799 ,EFIG=EFIG & ! TWG add
1800 ,EFSG=EFSG & ! TWG add
1801 ,WACT=WACT & ! TWG add
1802 ,CCN1_GS=CCN1_GS & ! TWG add
1803 ,CCN2_GS=CCN2_GS & ! TWG add
1804 ,CCN3_GS=CCN3_GS & ! TWG add
1805 ,CCN4_GS=CCN4_GS & ! TWG add
1806 ,CCN5_GS=CCN5_GS & ! TWG add
1807 ,CCN6_GS=CCN6_GS & ! TWG add
1808 ,CCN7_GS=CCN7_GS & ! TWG add
1809 ,NR_CU=NR_CU & ! TWG add
1810 ,QR_CU=QR_CU & ! TWG add
1811 ,NS_CU=NS_CU & ! TWG add
1812 ,QS_CU=QS_CU & ! TWG add
1813 ,CU_UAF=CU_UAF & ! TWG add
1814 ,QLSINK=qlsink & ! jdf for wrf-chem
1815 #if ( WRF_CHEM == 1 )
1816 ,WETSCAV_ON=config_flags%wetscav_onoff == 1 &
1817 ,EVAPPROD=evapprod,RAINPROD=rainprod &
1819 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & ! jdf for wrf-chem
1823 CASE (MILBRANDT2MOM)
1824 CALL wrf_debug(100, 'microphysics_driver: calling milbrandt2mom')
1825 IF (PRESENT (QV_CURR) .AND. &
1826 PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. &
1827 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
1828 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
1829 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
1830 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
1831 PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. &
1832 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1833 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
1834 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
1835 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
1836 PRESENT ( W ) ) THEN
1837 ! PRESENT (ccntype) &
1839 CALL mp_milbrandt2mom_driver( &
1840 ITIMESTEP=itimestep, &
1862 RAINNCV = RAINNCV, &
1864 SNOWNCV = SNOWNCV, &
1866 HAILNCV = HAILNCV, &
1867 GRPLNC = GRAUPELNC, &
1868 GRPLNCV = GRAUPELNCV, &
1870 ! ccntype = ccntype, &
1871 Zet = refl_10cm, & ! HM, 9/22/09 for refl
1872 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1873 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1874 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1877 Call wrf_error_fatal( 'arguments not present for calling milbrandt2mom')
1881 ! CASE (MILBRANDT3MOM)
1882 ! CALL wrf_debug(100, 'microphysics_driver: calling milbrandt3mom')
1883 ! IF (PRESENT (QV_CURR) .AND. &
1884 ! PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. &
1885 ! PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. PRESENT (QZR_CURR) .AND. &
1886 ! PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. PRESENT (QZI_CURR) .AND. &
1887 ! PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. PRESENT (QZS_CURR) .AND. &
1888 ! PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. PRESENT (QZG_CURR) .AND. &
1889 ! PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. PRESENT (QZH_CURR) .AND. &
1890 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1891 ! PRESENT ( W ) ) THEN
1892 ! CALL mp_milbrandt3mom_driver( &
1893 ! ITIMESTEP=itimestep, & !*
1918 ! ,RAINNC=RAINNC & !*
1919 ! ,RAINNCV=RAINNCV & !*
1921 ! ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1922 ! ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1923 ! ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1926 ! Call wrf_error_fatal( 'arguments not present for calling milbrandt3mom')
1930 CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')
1931 IF (PRESENT (QV_CURR) .AND. &
1932 PRESENT (QC_CURR) .AND. &
1933 PRESENT (QR_CURR) .AND. &
1934 PRESENT (QI_CURR) .AND. &
1935 PRESENT (QS_CURR) .AND. &
1936 PRESENT (QG_CURR) .AND. &
1937 PRESENT (QH_CURR) .AND. &
1938 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1940 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
1941 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
1942 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
1944 PRESENT ( W ) .AND. &
1945 PRESENT (QVOLG_CURR) ) THEN
1948 CALL nssl_2mom_driver( &
1949 ITIMESTEP=itimestep, &
1972 RAINNCV = RAINNCV, &
1974 SNOWNCV = SNOWNCV, &
1976 HAILNCV = HAILNCV, &
1977 GRPLNC = GRAUPELNC, &
1978 GRPLNCV = GRAUPELNCV, &
1981 diagflag = diagflag, &
1982 ke_diag = ke_diag, &
1983 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1984 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1985 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1988 Call wrf_error_fatal( 'arguments not present for calling nssl_1mom')
1993 CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')
1994 IF (PRESENT (QV_CURR) .AND. &
1995 PRESENT (QC_CURR) .AND. &
1996 PRESENT (QR_CURR) .AND. &
1997 PRESENT (QI_CURR) .AND. &
1998 PRESENT (QS_CURR) .AND. &
1999 PRESENT (QG_CURR) .AND. &
2000 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
2002 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
2003 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
2005 PRESENT ( W ) ) THEN
2008 CALL nssl_2mom_driver( &
2009 ITIMESTEP=itimestep, &
2024 RAINNCV = RAINNCV, &
2026 SNOWNCV = SNOWNCV, &
2027 GRPLNC = GRAUPELNC, &
2028 GRPLNCV = GRAUPELNCV, &
2031 diagflag = diagflag, &
2032 ke_diag = ke_diag, &
2033 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
2034 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
2035 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2038 Call wrf_error_fatal( 'arguments not present for calling nssl_1momlfo')
2042 CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')
2043 IF (PRESENT (QV_CURR) .AND. &
2044 PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR) .AND. &
2045 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
2046 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
2047 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
2048 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
2049 PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. &
2050 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
2052 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
2053 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
2054 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
2056 PRESENT ( W ) .AND. &
2057 PRESENT (QVOLG_CURR) .AND. F_QVOLG .AND. &
2058 PRESENT (QVOLH_CURR) .AND. F_QVOLH ) THEN
2061 CALL nssl_2mom_driver( &
2062 ITIMESTEP=itimestep, &
2087 RAINNCV = RAINNCV, &
2089 SNOWNCV = SNOWNCV, &
2091 HAILNCV = HAILNCV, &
2092 GRPLNC = GRAUPELNC, &
2093 GRPLNCV = GRAUPELNCV, &
2096 #if ( WRF_CHEM == 1 )
2097 WETSCAV_ON = config_flags%wetscav_onoff == 1, &
2098 EVAPPROD=evapprod,RAINPROD=rainprod, &
2100 nssl_progn=nssl_progn, &
2101 diagflag = diagflag, &
2102 ke_diag = ke_diag, &
2104 qrcuten=qrcuten, & ! hm
2105 qscuten=qscuten, & ! hm
2106 qicuten=qicuten, & ! hm
2107 qccuten=qccuten, & ! hm
2108 re_cloud=re_cloud, &
2111 has_reqc=has_reqc, & ! ala G. Thompson
2112 has_reqi=has_reqi, & ! ala G. Thompson
2113 has_reqs=has_reqs, & ! ala G. Thompson
2114 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
2115 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
2116 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2120 Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')
2124 CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')
2125 IF (PRESENT (QV_CURR) .AND. &
2126 PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR) .AND. &
2127 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
2128 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
2129 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
2130 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
2131 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
2133 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
2134 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
2135 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
2137 PRESENT ( W ) .AND. &
2138 PRESENT (QVOLG_CURR) .AND. F_QVOLG ) THEN
2141 CALL nssl_2mom_driver( &
2142 ITIMESTEP=itimestep, &
2164 RAINNCV = RAINNCV, &
2166 SNOWNCV = SNOWNCV, &
2168 HAILNCV = HAILNCV, &
2169 GRPLNC = GRAUPELNC, &
2170 GRPLNCV = GRAUPELNCV, &
2173 #if ( WRF_CHEM == 1 )
2174 WETSCAV_ON = config_flags%wetscav_onoff == 1, &
2175 EVAPPROD=evapprod,RAINPROD=rainprod, &
2177 nssl_progn=nssl_progn, &
2178 diagflag = diagflag, &
2180 qrcuten=qrcuten, & ! hm
2181 qscuten=qscuten, & ! hm
2182 qicuten=qicuten, & ! hm
2183 qccuten=qccuten, & ! hm
2184 re_cloud=re_cloud, &
2187 has_reqc=has_reqc, & ! ala G. Thompson
2188 has_reqi=has_reqi, & ! ala G. Thompson
2189 has_reqs=has_reqs, & ! ala G. Thompson
2190 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
2191 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
2192 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2196 Call wrf_error_fatal( 'arguments not present for calling nssl_2momg')
2200 CALL wrf_debug(100, 'microphysics_driver: calling nssl_2momccn')
2201 IF (PRESENT (QV_CURR) .AND. &
2202 PRESENT (QC_CURR) .AND. PRESENT (QNDROP_CURR) .AND. &
2203 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
2204 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
2205 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
2206 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
2207 PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. &
2208 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
2210 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
2211 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
2212 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
2214 PRESENT ( W ) .AND. &
2215 PRESENT (QVOLG_CURR) .AND. F_QVOLG .AND. &
2216 PRESENT (QVOLH_CURR) .AND. F_QVOLH .AND. &
2217 PRESENT( QNN_CURR ) ) THEN
2220 CALL nssl_2mom_driver( &
2221 ITIMESTEP=itimestep, &
2247 RAINNCV = RAINNCV, &
2249 SNOWNCV = SNOWNCV, &
2251 HAILNCV = HAILNCV, &
2252 GRPLNC = GRAUPELNC, &
2253 GRPLNCV = GRAUPELNCV, &
2256 #if ( WRF_CHEM == 1 )
2257 WETSCAV_ON = config_flags%wetscav_onoff == 1, &
2258 EVAPPROD=evapprod,RAINPROD=rainprod,&
2260 nssl_progn=nssl_progn, &
2261 diagflag = diagflag, &
2262 ke_diag = ke_diag, &
2264 qrcuten=qrcuten, & ! hm
2265 qscuten=qscuten, & ! hm
2266 qicuten=qicuten, & ! hm
2267 qccuten=qccuten, & ! hm
2268 re_cloud=re_cloud, &
2271 has_reqc=has_reqc, & ! ala G. Thompson
2272 has_reqi=has_reqi, & ! ala G. Thompson
2273 has_reqs=has_reqs, & ! ala G. Thompson
2274 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
2275 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
2276 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2279 Call wrf_error_fatal( 'arguments not present for calling nssl_2momccn')
2282 CASE (GSFCGCESCHEME)
2283 CALL wrf_debug ( 100 , 'microphysics_driver: calling GSFCGCE' )
2284 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2285 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2286 PRESENT( QS_CURR ) .AND. &
2287 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2288 PRESENT( HAIL ) .AND. PRESENT ( ICE2 ) .AND. &
2289 PRESENT( Z ) .AND. PRESENT ( W ) ) THEN
2297 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2298 ,HT=ht, DZ8W=dz8w, GRAV=G &
2299 ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2300 ,ITIMESTEP=itimestep &
2301 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2302 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2303 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2304 ,RAINNC=rainnc, RAINNCV=rainncv &
2305 ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr &
2306 ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv &
2307 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2308 ,diagflag=diagflag & ! added for radar reflectivity
2309 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2312 ,IHAIL=hail, ICE2=ice2 &
2314 ! HAIL = 1, run gsfcgce with hail option
2315 ! 0, run gsfcgce with graupel option <---- default
2316 ! note: no effect if ice2 = 1
2317 ! ICE2 = 1, run gsfcgce with only snow, ice
2318 ! 2, run gsfcgce with only graupel, ice
2319 ! 0, run gsfcgce with snow, ice and hail/graupel <---- default
2322 CALL wrf_error_fatal ( 'arguments not present for calling GSFCGCE' )
2325 CASE (NUWRF4ICESCHEME)
2326 CALL wrf_debug ( 100 , 'microphysics_driver: calling NUWRF4ICE' )
2327 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2328 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2329 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2330 PRESENT( QH_CURR ) .AND. &
2331 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2332 PRESENT( HAIL ) .AND. PRESENT ( ICE2 ) .AND. &
2333 PRESENT( Z ) .AND. PRESENT ( W ) ) THEN
2334 CALL gsfcgce_4ice_nuwrf( &
2342 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2343 ,HT=ht, DZ8W=dz8w, GRAV=G, W=w &
2344 ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2345 ,ITIMESTEP=itimestep, XLAND=xland, DX=dx &
2346 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2347 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2348 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2349 ,RAINNC=rainnc, RAINNCV=rainncv &
2350 ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr &
2351 ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv &
2352 ,HAILNC=hailnc, HAILNCV=hailncv &
2353 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2354 ,diagflag=diagflag & ! added for radar reflectivity
2355 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2358 ! ,IHAIL=hail, ICE4=ice2 & ! hardcoded in the 4ice scheme
2360 !NUWRF JJS 20110525 vvvvv
2361 ,PHYSC=physc, PHYSE=physe, PHYSD=physd &
2362 ,PHYSS=physs, PHYSM=physm, PHYSF=physf &
2363 ,ACPHYSC=acphysc, ACPHYSE=acphyse, ACPHYSD=acphysd &
2364 ,ACPHYSS=acphyss, ACPHYSM=acphysm, ACPHYSF=acphysf &
2365 ,RE_CLOUD_GSFC=re_cloud_gsfc &
2366 ,RE_RAIN_GSFC=re_rain_gsfc &
2367 ,RE_ICE_GSFC=re_ice_gsfc &
2368 ,RE_SNOW_GSFC=re_snow_gsfc &
2369 ,RE_GRAUPEL_GSFC=re_graupel_gsfc &
2370 ,RE_HAIL_GSFC=re_hail_gsfc &
2371 ,PRECR3D=precr3d,PRECI3D=preci3d,PRECS3D=precs3d &
2372 ,PRECG3D=precg3d,PRECH3D=prech3d &
2373 #if ( WRF_CHEM == 1)
2375 ,ICN_DIAG=icn_diag, NC_DIAG=nc_diag, GID=ID &
2376 ,CHEM_OPT=chem_opt &
2377 ,GSFCGCE_GOCART_COUPLING=gsfcgce_gocart_coupling &
2379 !NUWRF JJS 20110525 ^^^^^
2385 ! Snapshot total latent heating rate [K/s]
2386 phys_tot(i,k,j) = physc(i,k,j) + physe(i,k,j) + &
2387 physd(i,k,j) + physs(i,k,j) + physm(i,k,j) + &
2389 ! Accumulated total latent heating [K]
2390 acphys_tot(i,k,j) = acphysc(i,k,j) + acphyse(i,k,j) + &
2391 acphysd(i,k,j) + acphyss(i,k,j) + acphysm(i,k,j) + &
2399 CALL wrf_error_fatal ( 'arguments not present for calling NUWRF4ICESFCGCE' )
2403 CALL wrf_debug ( 100 , 'microphysics_driver: calling lin_et_al' )
2404 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2405 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2406 PRESENT( QS_CURR ) .AND. &
2407 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2417 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2418 ,HT=ht, DZ8W=dz8w, GRAV=G, CP=cp &
2419 ,RAIR=r_d, RVAPOR=R_v &
2420 ,XLS=xls, XLV=xlv, XLF=xlf &
2421 ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2422 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
2423 ,SVP3=svp3,SVPT0=svpt0 &
2424 ,RAINNC=rainnc, RAINNCV=rainncv &
2425 ,SNOWNC=snownc, SNOWNCV=snowncv &
2426 ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &
2427 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2428 ,diagflag=diagflag & ! added for radar reflectivity
2429 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2430 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2431 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2432 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2433 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg &
2434 ,F_QG=f_qg, F_QNDROP=f_qndrop &
2436 ,QNDROP=qndrop_curr &
2439 CALL wrf_error_fatal ( 'arguments not present for calling lin_et_al' )
2442 CASE (SBU_YLINSCHEME)
2443 CALL wrf_debug ( 100 , 'microphysics_driver: calling sbu_ylin' )
2444 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2445 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2446 PRESENT( QS_CURR ) .AND. &
2447 PRESENT( RI_CURR ) .AND. &
2448 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2459 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2462 ! ,RAIR=r_d, RVAPOR=R_v &
2463 ! ,XLS=xls, XLV=xlv, XLF=xlf &
2464 ! ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2465 ! ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
2466 ! ,SVP3=svp3,SVPT0=svpt0 &
2467 ,RAINNC=rainnc, RAINNCV=rainncv &
2468 ! ,SNOWNC=snownc, SNOWNCV=snowncv &
2469 ! ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &
2470 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2471 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2472 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2473 ! ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg &
2475 ! ,F_QNDROP=f_qndrop &
2477 ! ,QNDROP=qndrop_curr &
2480 CALL wrf_error_fatal ( 'arguments not present for calling sbu_ylin' )
2485 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm3' )
2486 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2487 PRESENT( QR_CURR ) .AND. &
2488 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2495 ,W=w,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2496 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2497 ,RD=r_d,RV=r_v,T0C=svpt0 &
2498 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2499 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2500 ,DEN0=rhoair0, DENR=rhowater &
2501 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2502 ,RAIN=rainnc ,RAINNCV=rainncv &
2503 ,SNOW=snownc ,SNOWNCV=snowncv &
2506 ,has_reqc=has_reqc & ! for radiation +
2507 ,has_reqi=has_reqi &
2508 ,has_reqs=has_reqs &
2509 ,re_cloud=re_cloud &
2511 ,re_snow=re_snow & ! for radiation -
2513 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2514 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2515 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2518 CALL wrf_error_fatal ( 'arguments not present for calling wsm3' )
2521 #ifndef XEON_OPTIMIZED_WSM5
2523 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm5' )
2524 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2525 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2526 PRESENT( QS_CURR ) .AND. &
2527 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2535 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2536 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2537 ,RD=r_d,RV=r_v,T0C=svpt0 &
2538 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2539 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2540 ,DEN0=rhoair0, DENR=rhowater &
2541 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2542 ,RAIN=rainnc ,RAINNCV=rainncv &
2543 ,SNOW=snownc ,SNOWNCV=snowncv &
2546 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2547 ,diagflag=diagflag & ! added for radar reflectivity
2548 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2549 ,has_reqc=has_reqc & ! for radiation +
2550 ,has_reqi=has_reqi &
2551 ,has_reqs=has_reqs &
2552 ,re_cloud=re_cloud &
2554 ,re_snow=re_snow & ! for radiation -
2556 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2557 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2558 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2561 CALL wrf_error_fatal ( 'arguments not present for calling wsm5' )
2566 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm6' )
2567 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2568 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2569 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2570 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2579 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2580 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2581 ,RD=r_d,RV=r_v,T0C=svpt0 &
2582 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2583 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2584 ,DEN0=rhoair0, DENR=rhowater &
2585 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2586 ,RAIN=rainnc ,RAINNCV=rainncv &
2587 ,SNOW=snownc ,SNOWNCV=snowncv &
2589 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2590 ,diagflag=diagflag & ! added for radar reflectivity
2591 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2592 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2593 ,has_reqc=has_reqc & ! for radiation +
2594 ,has_reqi=has_reqi &
2595 ,has_reqs=has_reqs &
2596 ,re_cloud=re_cloud &
2598 ,re_snow=re_snow & ! for radiation -
2599 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2600 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2601 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2602 #if ( WRF_CHEM == 1 )
2603 ,WETSCAV_ON=config_flags%wetscav_onoff==1 &
2604 ,EVAPPROD=evapprod,RAINPROD=rainprod &
2608 CALL wrf_error_fatal ( 'arguments not present for calling wsm6' )
2612 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm6r' )
2613 IF ( PRESENT( QV_CURR ) .AND. PRESENT( QR_CURR ) .AND. &
2614 PRESENT( QC_CURR ) .AND. PRESENT( QS_CURR ) .AND. &
2615 PRESENT( QI_CURR ) .AND. PRESENT( QG_CURR ) .AND. &
2616 PRESENT( RAINNC ) .AND. PRESENT( RAINNCV )) THEN
2619 ,Q =qv_curr,Qc=qc_curr,Qi=qi_curr &
2620 ,Qr=qr_curr,Qs=qs_curr,Qg=qg_curr &
2621 ,DEN=rho, PII=pi_phy &
2623 ,DELZ=dz8w, DELT=dt &
2624 ,RAIN=rainnc,RAINNCV=rainncv &
2625 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2626 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2627 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2630 CALL wrf_error_fatal ( 'arguments not present for calling wsm6r' )
2634 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm7' )
2635 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2636 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2637 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2638 PRESENT( QH_CURR ) .AND. &
2639 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2649 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2650 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2651 ,RD=r_d,RV=r_v,T0C=svpt0 &
2652 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2653 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2654 ,DEN0=rhoair0, DENR=rhowater &
2655 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2656 ,RAIN=rainnc ,RAINNCV=rainncv &
2657 ,SNOW=snownc ,SNOWNCV=snowncv &
2659 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2660 ,diagflag=diagflag & ! added for radar reflectivity
2661 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2662 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2663 ,HAIL=hailnc ,HAILNCV=hailncv &
2664 ,has_reqc=has_reqc & ! for radiation +
2665 ,has_reqi=has_reqi &
2666 ,has_reqs=has_reqs &
2667 ,re_cloud=re_cloud &
2669 ,re_snow=re_snow & ! for radiation -
2670 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2671 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2672 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2675 CALL wrf_error_fatal ( 'arguments not present for calling wsm7' )
2679 CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm5' )
2680 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2681 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2682 PRESENT( QS_CURR ) .AND. PRESENT( QNN_CURR ) .AND. &
2683 PRESENT ( QNC_CURR ) .AND. PRESENT( QNR_CURR ).AND. &
2684 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2695 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2696 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc & ! RAS
2697 ,RD=r_d,RV=r_v,T0C=svpt0 &
2698 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2699 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2700 ,DEN0=rhoair0, DENR=rhowater &
2701 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2702 ,RAIN=rainnc ,RAINNCV=rainncv &
2703 ,SNOW=snownc ,SNOWNCV=snowncv &
2705 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2706 ,diagflag=diagflag & ! added for radar reflectivity
2707 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2708 ,has_reqc=has_reqc & ! for radiation +
2709 ,has_reqi=has_reqi &
2710 ,has_reqs=has_reqs &
2711 ,re_cloud=re_cloud &
2713 ,re_snow=re_snow & ! for radiation -
2714 ,ITIMESTEP=itimestep &
2715 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2716 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2717 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2720 CALL wrf_error_fatal ( 'arguments not present for calling wdm5')
2724 CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm6' )
2725 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2726 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2727 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2728 PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. &
2729 PRESENT( QNR_CURR ).AND. &
2730 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2742 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2743 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc & ! RAS
2744 ,RD=r_d,RV=r_v,T0C=svpt0 &
2745 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2746 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2747 ,DEN0=rhoair0, DENR=rhowater &
2748 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2749 ,xland=xland & ! land mask, 1: land, 2: water
2750 ,RAIN=rainnc ,RAINNCV=rainncv &
2751 ,SNOW=snownc ,SNOWNCV=snowncv &
2753 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2754 ,diagflag=diagflag & ! added for radar reflectivity
2755 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2756 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2757 ,ITIMESTEP=itimestep &
2758 ,has_reqc=has_reqc & ! for radiation +
2759 ,has_reqi=has_reqi &
2760 ,has_reqs=has_reqs &
2761 ,re_cloud=re_cloud &
2763 ,re_snow=re_snow & ! for radiation -
2764 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2765 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2766 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2769 CALL wrf_error_fatal ( 'arguments not present for calling wdm6')
2773 CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm7' )
2774 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2775 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2776 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2777 PRESENT( QH_CURR ) .AND. &
2778 PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. &
2779 PRESENT( QNR_CURR ).AND. &
2780 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2793 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2794 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc & ! RAS
2795 ,RD=r_d,RV=r_v,T0C=svpt0 &
2796 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2797 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2798 ,DEN0=rhoair0, DENR=rhowater &
2799 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2800 ,xland=xland & ! land mask, 1: land, 2: water
2801 ,RAIN=rainnc ,RAINNCV=rainncv &
2802 ,SNOW=snownc ,SNOWNCV=snowncv &
2804 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2805 ,diagflag=diagflag & ! added for radar reflectivity
2806 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2807 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2808 ,HAIL=hailnc ,HAILNCV=hailncv &
2809 ,ITIMESTEP=itimestep &
2810 ,has_reqc=has_reqc & ! for radiation +
2811 ,has_reqi=has_reqi &
2812 ,has_reqs=has_reqs &
2813 ,re_cloud=re_cloud &
2815 ,re_snow=re_snow & ! for radiation -
2816 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2817 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2818 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2821 CALL wrf_error_fatal ( 'arguments not present for calling wdm7')
2824 CASE (ETAMPNEW) !-- Operational 4-km High-Resolution Window (HRW) version
2825 CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')
2827 IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &
2828 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2829 PRESENT( mp_restart_state ) .AND. &
2830 PRESENT( tbpvs_state ) .AND. &
2831 PRESENT( tbpvs0_state ) ) THEN
2833 ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy &
2834 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
2840 ,LOWLYR=LOWLYR,SR=SR &
2841 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY &
2842 ,F_RIMEF_PHY=F_RIMEF_PHY &
2843 ,RAINNC=rainnc,RAINNCV=rainncv &
2844 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2845 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2846 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2847 ,MP_RESTART_STATE=mp_restart_state &
2848 ,TBPVS_STATE=tbpvs_state,TBPVS0_STATE=tbpvs0_state &
2851 CALL wrf_error_fatal ( 'arguments not present for calling etampnew' )
2853 CASE (FER_MP_HIRES) !-- Operational Ferrier-Aligo High-Resolution Window(HRW) version
2854 ! (2014/2 version) added by Weiguo Wang on
2856 CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')
2858 IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &
2859 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2860 PRESENT( mp_restart_state ) .AND. &
2861 PRESENT( tbpvs_state ) .AND. &
2862 PRESENT( tbpvs0_state ) ) THEN
2864 ! write(0,*)',f_qv,f_qc,f_qr,f_qi,f_qs,f_qg',f_qv,f_qc,f_qr,f_qi,f_qs,f_qg
2865 ! write(0,*)'max qi=',maxval(qi_curr(its:ite,kts:kte,jts:jte))
2866 ! write(0,*)'max qs=',maxval(qs_curr(its:ite,kts:kte,jts:jte))
2869 ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id &
2870 ,RAINNC=rainnc,RAINNCV=rainncv &
2871 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
2874 ,LOWLYR=LOWLYR,SR=SR &
2875 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY &
2876 ,F_RIMEF_PHY=F_RIMEF_PHY &
2877 ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr &
2878 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2879 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2880 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2883 CALL wrf_error_fatal ( 'arguments not present for calling fer_hires' )
2886 CASE (FER_MP_HIRES_ADVECT) !-- Operational Ferrier-Aligo High-Resolution Window(HRW) version
2887 ! (2014/2 version) added by Weiguo Wang on
2889 ! Modified for advection, Sam Trahan, August 2015
2890 CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')
2892 IF ( PRESENT( qv_curr ) .AND. PRESENT( qi_curr ) .AND. &
2893 PRESENT( qc_curr ) .and. PRESENT(qrimef_curr) .AND. &
2894 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2895 PRESENT( mp_restart_state ) .AND. &
2896 PRESENT( tbpvs_state ) .AND. &
2897 PRESENT( tbpvs0_state ) ) THEN
2899 ! write(0,*)',f_qv,f_qc,f_qr,f_qi,f_qs,f_qg',f_qv,f_qc,f_qr,f_qi,f_qs,f_qg
2900 ! write(0,*)'max qi=',maxval(qi_curr(its:ite,kts:kte,jts:jte))
2901 ! write(0,*)'max qs=',maxval(qs_curr(its:ite,kts:kte,jts:jte))
2903 CALL FER_HIRES_ADVECT( &
2904 ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id &
2905 ,RAINNC=rainnc,RAINNCV=rainncv &
2906 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
2908 ,LOWLYR=LOWLYR,SR=SR &
2909 ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr,QRIMEF=qrimef_curr &
2910 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2911 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2912 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2915 CALL wrf_error_fatal ( 'arguments not present for calling fer_hires' )
2919 CASE (CAMMGMPSCHEME)
2920 CALL wrf_debug ( 100 , 'microphysics_driver: calling CAMMGMPSCHEME')
2921 IF ( PRESENT( z ) .AND. PRESENT( ht ) .AND. &
2922 PRESENT( qs_curr ) .AND. &
2923 PRESENT( qv_curr ) .AND. PRESENT( qc_curr ) .AND. &
2924 PRESENT( qi_curr ) .AND. PRESENT( f_qc ) .AND. &
2925 PRESENT( qr_curr ) .AND. PRESENT( qndrop_curr ) .AND. &
2926 PRESENT( f_qi ) .AND. PRESENT( qnc_curr ) .AND. &
2927 PRESENT( RAINNCV ) .AND. PRESENT( SNOWNCV ) .AND. &
2928 PRESENT( qns_curr ) .AND. PRESENT( qnr_curr ) .AND. &
2929 #if ( WRF_CHEM == 1 )
2930 PRESENT( chem ) .AND. PRESENT(dgnum4D ) .AND. &
2931 PRESENT( dgnumwet4D ) .AND. &
2933 PRESENT( qni_curr ) .AND. PRESENT( RAINNC ) ) THEN
2934 #if ( WRF_CHEM == 1 )
2935 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
2936 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
2937 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
2938 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
2941 CALL CAMMGMP(ITIMESTEP=itimestep,DT=dt,P8W=p8w_hyd,P_HYD=p_hyd &
2942 ,T_PHY=t_phy,PI_PHY=pi_phy,Z_AT_W=z_at_w,QFX=qfx &
2943 ,TKE_PBL=tke_pbl,TURBTYPE3D=turbtype3d,SMAW3D=smaw3d &
2944 ,DLF3D=dlf,DLF2_3D=dlf2,RLIQ2D=rliq,Z_SEA_LEVEL=z &
2945 ,KVH3D=exch_h,HT=ht,ALT=alt,ACCUM_MODE=accum_mode &
2946 ,AITKEN_MODE=aitken_mode,COARSE_MODE=coarse_mode &
2947 ,ICWMRSH3D=icwmrsh3d,ICWMRDP3D=icwmrdp3d,SHFRC3D=shfrc3d &
2948 ,CMFMC3D=cmfmc3d,CMFMC2_3D=cmfmc2_3d &
2949 ,CONFIG_FLAGS=config_flags,F_ICE_PHY=f_ice_phy &
2950 ,F_RAIN_PHY=f_rain_phy &
2951 #if ( WRF_CHEM == 1 )
2952 ,DGNUM4D=dgnum4D,DGNUMWET4D=dgnumwet4D &
2954 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2955 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2956 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2957 !Output variables from CAMMGMP
2958 ,TH=th,CLDFRA_OLD_MP=cldfra_old_mp,CLDFRA_MP=cldfra_mp &
2959 ,CLDFRA_MP_ALL=cldfra_mp_all,lradius=lradius,iradius=iradius &
2960 ,CLDFRAI=cldfrai,CLDFRAL=cldfral &
2961 ,CLDFRA_CONV=cldfra_conv,WSEDL3D=wsedl3d &
2962 ,RAINNC=rainnc,RAINNCV=rainncv,SNOWNC=snownc,SNOWNCV=snowncv &
2963 ,SR=sr,QV_CURR=qv_curr,QC_CURR=qc_curr,QI_CURR=qi_curr &
2964 ,QS_CURR=qs_curr,QR_CURR=qr_curr,NC3D=qnc_curr &
2965 ,NI3D=qni_curr,NS3D=qns_curr,NR3D=qnr_curr,QNDROP=qndrop_curr&
2966 ,RH_OLD_MP=rh_old_mp,LCD_OLD_MP=lcd_old_mp &
2967 #if ( WRF_CHEM == 1 )
2969 ,QME3D=qme3d,PRAIN3D=prain3d,NEVAPR3D=nevapr3d &
2970 ,RATE1ORD_CW2PR_ST3D=rate1ord_cw2pr_st3d &
2972 ,XLAND=XLAND,SNOWH=SNOWH &
2975 CALL wrf_error_fatal ( 'arguments not present for calling CAMMGMP SCHEME' )
2978 ! Added by Zhuxiao, lscond (simplified Large-scale condensation scheme by Jimy )
2979 #if ( WRFPLUS == 1 )
2981 CALL wrf_debug ( 100 , 'microphysics_driver: calling lscond' )
2982 IF ( PRESENT( QV_CURR ) .AND. &
2983 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV )) THEN
2989 ,RHO=rho, PII=pi_phy, XLV=xlv, CP=cp &
2990 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
2991 ,SVP3=svp3,SVPT0=svpt0 &
2994 ,RAINNC=rainnc,RAINNCV=rainncv &
2995 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2996 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2997 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
3000 CALL wrf_error_fatal ( 'arguments not present for calling lscond' )
3006 CALL wrf_debug ( 100 , 'microphysics_driver: case MADWRF_MP')
3010 WRITE( wrf_err_message , * ) 'The microphysics option does not exist: mp_physics = ', mp_physics
3011 CALL wrf_error_fatal ( wrf_err_message )
3013 END SELECT micro_select
3016 !$OMP END PARALLEL DO
3018 #ifdef XEON_OPTIMIZED_WSM5
3023 ! IF ( PRESENT (LWP) ) THEN
3024 ! DO ij = 1 , num_tiles
3033 ! lwp(i,j)=lwp(i,j)+qc_curr(i,k,j)*rho(i,k,j)*dz8w(i,k,j)
3041 CALL wrf_debug ( 200 , 'microphysics_driver: returning from' )
3045 END SUBROUTINE microphysics_driver
3047 subroutine Add_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
3048 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
3049 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
3050 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
3054 integer, intent(in) :: its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte
3055 real, intent(in) :: pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, pert_thom_ni
3056 real, dimension(ims:ime, kms:kme, jms:jme), optional, intent (in) :: perts_qvapor, perts_qcloud, perts_qice, &
3057 perts_qsnow, perts_ni
3058 real, dimension(ims:ime, kms:kme, jms:jme), intent (inout) :: qv_curr, qc_curr, qi_curr, qs_curr, qni_curr
3059 real, dimension (its:ite, kts:kte, jts:jte), intent (out) :: qv_tmp, qc_tmp, qi_tmp, qs_tmp, qni_tmp
3067 qv_tmp(i, k, j) = qv_curr(i, k, j)
3068 qv_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qvapor(i, k, j) * pert_thom_qv) * qv_curr(i, k, j))
3069 qc_tmp(i, k, j) = qc_curr(i, k, j)
3070 qc_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qcloud(i, k, j) * pert_thom_qc) * qc_curr(i, k, j))
3071 qi_tmp(i, k, j) = qi_curr(i, k, j)
3072 qi_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qice(i, k, j) * pert_thom_qi) * qi_curr(i, k, j))
3073 qs_tmp(i, k, j) = qs_curr(i, k, j)
3074 qs_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qsnow(i, k, j) * pert_thom_qs) * qs_curr(i, k, j))
3075 qni_tmp(i, k, j) = qni_curr(i, k, j)
3076 qni_curr(i, k, j) = max (NI_MIN, (1.0 + perts_ni(i, k, j) * pert_thom_ni) * qni_curr(i, k, j))
3081 end subroutine Add_multi_perturb_mp_perturbations
3083 subroutine Remove_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
3084 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
3085 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
3086 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
3090 integer, intent(in) :: its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte
3091 real, intent(in) :: pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, pert_thom_ni
3092 real, dimension(ims:ime, kms:kme, jms:jme), optional, intent (in) :: perts_qvapor, perts_qcloud, perts_qice, &
3093 perts_qsnow, perts_ni
3094 real, dimension(ims:ime, kms:kme, jms:jme), intent (inout) :: qv_curr, qc_curr, qi_curr, qs_curr, qni_curr
3095 real, dimension (its:ite, kts:kte, jts:jte), intent (in) :: qv_tmp, qc_tmp, qi_tmp, qs_tmp, qni_tmp
3103 qv_curr(i, k, j) = max (QX_MIN, qv_curr(i, k, j) - perts_qvapor(i, k, j) * pert_thom_qv * qv_tmp(i, k, j))
3104 qc_curr(i, k, j) = max (QX_MIN, qc_curr(i, k, j) - perts_qcloud(i, k, j) * pert_thom_qc * qc_tmp(i, k, j))
3105 qi_curr(i, k, j) = max (QX_MIN, qi_curr(i, k, j) - perts_qice(i, k, j) * pert_thom_qi * qi_tmp(i, k, j))
3106 qs_curr(i, k, j) = max (QX_MIN, qs_curr(i, k, j) - perts_qsnow(i, k, j) * pert_thom_qs * qs_tmp(i, k, j))
3107 qni_curr(i, k, j) = max (NI_MIN, qni_curr(i, k, j) - perts_ni(i, k, j) * pert_thom_ni * qni_tmp(i, k, j))
3112 end subroutine Remove_multi_perturb_mp_perturbations
3114 END MODULE module_microphysics_driver