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, 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
176 USE module_state_description, ONLY : LSCONDSCHEME, MKESSLERSCHEME
178 #if ( WRF_CHEM == 1 )
180 USE module_state_description, ONLY : &
181 num_chem & !inline gocart
182 ,p_bc1, p_bc2, p_oc1, p_oc2 & !inline gocart
183 ,p_dust_1, p_dust_2, p_dust_3 & !inline gocart
184 ,p_dust_4, p_dust_5 & !inline gocart
185 ,p_sulf, p_seas_1, p_seas_2 & !inline gocart
191 USE module_dm, ONLY : &
192 local_communicator, mytask, wrf_dm_min_real, wrf_dm_max_real
196 USE module_model_constants
198 USE module_configure, only: grid_config_rec_type
199 #if ( WRF_CHEM == 1 )
200 !mchen USE module_state_description, only: num_scalar ! For CAMMGMP scheme Prognostic aerosols
201 USE module_state_description, only: num_chem ! mchen
202 USE modal_aero_data, only: ntot_amode_cam_mam => ntot_amode ! For CAMMGMP scheme Prognostic aerosols
205 ! *** add new modules of schemes here
207 USE module_mp_kessler
209 USE module_mp_mkessler
210 USE module_mp_nconvp ! added by Zhuxiao
213 USE module_mp_sbu_ylin
219 USE module_mp_fer_hires
220 USE module_mp_thompson
221 USE module_mp_full_sbm
222 #if ( BUILD_SBM_FAST == 1 )
223 USE module_mp_fast_sbm
225 USE module_mp_gsfcgce
226 USE module_mp_gsfcgce_4ice_nuwrf, only: gsfcgce_4ice_nuwrf
227 USE module_mp_morr_two_moment
229 USE module_mp_jensen_ishmael
231 USE module_mp_morr_two_moment_aero
237 USE module_mp_milbrandt2mom
239 USE module_mp_cammgmp_driver, ONLY: CAMMGMP ! CAM5's microphysics driver
241 ! USE module_mp_milbrandt3mom
242 USE module_mp_nssl_2mom
244 USE module_mixactivate, only: prescribe_aerosol_mixactivate
246 ! For checking model timestep is history time (for radar reflectivity)
247 USE module_utility, ONLY: WRFU_Clock, WRFU_Alarm
248 USE module_domain, ONLY : HISTORY_ALARM, Is_alarm_tstep
249 USE module_irrigation
253 !----------------------------------------------------------------------
254 ! This driver calls subroutines for the microphys.
259 ! Lin et al. (1983), Rutledge and Hobbs (1984)
260 ! WRF Single-Moment 3-class, Hong, Dudhia and Chen (2004)
261 ! WRF Single-Moment 5-class, Hong, Dudhia and Chen (2004)
262 ! WRF Single-Moment 6-class, Lim and Hong (2003 WRF workshop)
263 ! Eta Grid-scale Cloud and Precipitation scheme (EGCP01, Ferrier)
264 ! * etampnew - what's in the operational 4-km High-Resolution Window Runs
265 ! Goddard 4-ice scheme (2016)
267 ! Milbrandt and Yau (2005)
271 ! WRF Double-Moment 5-class
272 ! WRF Double-Moment 6-class
274 !----------------------------------------------------------------------
276 !======================================================================
277 ! Grid structure in physics part of WRF
278 !----------------------------------------------------------------------
279 ! The horizontal velocities used in the physics are unstaggered
280 ! relative to temperature/moisture variables. All predicted
281 ! variables are carried at half levels except w, which is at full
282 ! levels. Some arrays with names (*8w) are at w (full) levels.
284 !----------------------------------------------------------------------
285 ! In WRF, kms (smallest number) is the bottom level and kme (largest
286 ! number) is the top level. In your scheme, if 1 is at the top level,
287 ! then you have to reverse the order in the k direction.
289 ! kme - half level (no data at this level)
290 ! kme ----- full level
292 ! kme-1 ----- full level
297 ! kms+2 ----- full level
299 ! kms+1 ----- full level
301 ! kms ----- full level
303 !======================================================================
306 ! Rho_d dry density (kg/m^3)
307 ! Theta_m moist potential temperature (K)
308 ! Qv water vapor mixing ratio (kg/kg)
309 ! Qc cloud water mixing ratio (kg/kg)
310 ! Qr rain water mixing ratio (kg/kg)
311 ! Qi cloud ice mixing ratio (kg/kg)
312 ! Qs snow mixing ratio (kg/kg)
313 ! Qg graupel mixing ratio (kg/kg)
314 ! Qh hail mixing ratio (kg/kg)
315 ! Qndrop droplet number mixing ratio (#/kg)
316 ! Qni cloud ice number concentration (#/kg)
317 ! Qns snow number concentration (#/kg)
318 ! Qnr rain number concentration (#/kg)
319 ! Qng graupel number concentration (#/kg)
320 ! Qnh hail number concentration (#/kg)
322 ! Qzr rain reflectivity (m6/kg)
323 ! Qzi ice reflectivity (m6/kg)
324 ! Qzs snow reflectivity (m6/kg)
325 ! Qzg graupel reflectivity (m6/kg)
326 ! Qzh hail reflectivity (m6/kg)
328 ! Qvolg graupel particle volume (m3/kg)
331 !----------------------------------------------------------------------
332 !-- th potential temperature (K)
333 !-- moist_new updated moisture array (kg/kg)
334 !-- moist_old Old moisture array (kg/kg)
335 !-- rho density of air (kg/m^3)
336 !-- pi_phy exner function (dimensionless)
338 !-- RAINNC grid scale precipitation (mm)
339 !-- RAINNCV one time step grid scale precipitation (mm/step)
340 !-- SNOWNC grid scale snow and ice (mm)
341 !-- SNOWNCV one time step grid scale snow and ice (mm/step)
342 !-- GRAUPELNC grid scale graupel (mm)
343 !-- GRAUPELNCV one time step grid scale graupel (mm/step)
344 !-- HAILNC grid scale hail (mm)
345 !-- HAILNCV one time step grid scale hail (mm/step)
346 !-- SR one time step mass ratio of snow to total precip
347 !-- z Height above sea level (m)
349 !-- G acceleration due to gravity (m/s^2)
350 !-- CP heat capacity at constant pressure for dry air (J/kg/K)
351 !-- R_d gas constant for dry air (J/kg/K)
352 !-- R_v gas constant for water vapor (J/kg/K)
353 !-- XLS latent heat of sublimation (J/kg)
354 !-- XLV latent heat of vaporization (J/kg)
355 !-- XLF latent heat of melting (J/kg)
356 !-- rhowater water density (kg/m^3)
357 !-- rhosnow snow density (kg/m^3)
358 !-- F_ICE_PHY Fraction of ice.
359 !-- F_RAIN_PHY Fraction of rain.
360 !-- F_RIMEF_PHY Mass ratio of rimed ice (rime factor)
361 !-- t8w temperature at layer interfaces
362 !-- cldfra, cldfra_old, current, previous cloud fraction
363 !-- exch_h vertical diffusivity (m2/s)
364 !-- qlsink Fractional cloud water sink (/s)
365 !-- precr rain precipitation rate at all levels (kg/m2/s)
366 !-- preci ice precipitation rate at all levels (kg/m2/s)
367 !-- precs snow precipitation rate at all levels (kg/m2/s)
368 !-- precg graupel precipitation rate at all levels (kg/m2/s) &
369 !-- P_QV species index for water vapor
370 !-- P_QC species index for cloud water
371 !-- P_QR species index for rain water
372 !-- P_QI species index for cloud ice
373 !-- P_QS species index for snow
374 !-- P_QG species index for graupel
375 !-- P_QH species index for hail
376 !-- P_QNDROP species index for cloud drop mixing ratio
377 !-- P_QNR species index for rain number concentration,
378 !-- P_QNI species index for cloud ice number concentration
379 !-- P_QNS species index for snow number concentration,
380 !-- P_QNG species index for graupel number concentration,
381 !-- P_QNH species index for hail number concentration,
382 !-- P_QZR species index for rain reflectivity
383 !-- P_QZI species index for ice reflectivity
384 !-- P_QZS species index for snow reflectivity
385 !-- P_QZG species index for graupel reflectivity
386 !-- P_QZH species index for hail reflectivity
387 !-- P_QVOLG species index for graupel particle volume,
388 !-- id grid id number
389 !-- ids start index for i in domain
390 !-- ide end index for i in domain
391 !-- jds start index for j in domain
392 !-- jde end index for j in domain
393 !-- kds start index for k in domain
394 !-- kde end index for k in domain
395 !-- ims start index for i in memory
396 !-- ime end index for i in memory
397 !-- jms start index for j in memory
398 !-- jme end index for j in memory
399 !-- kms start index for k in memory
400 !-- kme end index for k in memory
401 !-- i_start start indices for i in tile
402 !-- i_end end indices for i in tile
403 !-- j_start start indices for j in tile
404 !-- j_end end indices for j in tile
405 !-- its start index for i in tile
406 !-- ite end index for i in tile
407 !-- jts start index for j in tile
408 !-- jte end index for j in tile
409 !-- kts start index for k in tile
410 !-- kte end index for k in tile
411 !-- num_tiles number of tiles
412 !-- diagflag Logical to tell us when to produce diagnostics for history or restart
414 !======================================================================
415 INTEGER,parameter :: iunit=6
416 INTEGER :: mpi_error_code=1
418 TYPE(grid_config_rec_type), INTENT(IN ) , OPTIONAL :: config_flags
419 INTEGER, INTENT(IN ) :: mp_physics
420 LOGICAL, INTENT(IN ) :: specified
421 INTEGER, OPTIONAL, INTENT(IN ) :: chem_opt, progn
422 INTEGER, OPTIONAL, INTENT(IN ) :: hail, ice2 !, ccntype
424 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde
425 INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme,num_scalar
427 INTEGER, INTENT(IN ) :: num_sbmradar
428 INTEGER, INTENT(IN ) :: sbm_diagnostics
430 INTEGER, OPTIONAL, INTENT(IN ) :: ips,ipe, jps,jpe, kps,kpe
431 INTEGER, INTENT(IN ) :: kts,kte
432 INTEGER, INTENT(IN ) :: itimestep,num_tiles,spec_zone
433 INTEGER, DIMENSION(num_tiles), INTENT(IN) :: &
434 & i_start,i_end,j_start,j_end
436 LOGICAL, INTENT(IN ) :: warm_rain
438 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
443 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
450 !NUWRF JJS 20101021 vvvvv
451 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
452 INTENT(INOUT), OPTIONAL :: phys_tot, &
467 !NUWRF JJS 20101021 ^^^^^
468 !NUWRF JJS 20140225 vvvvv
469 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
470 INTENT(INOUT), OPTIONAL :: re_cloud_gsfc, &
476 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ), &
479 precr3d, & ! rain precipitation rate at all levels (kg/m2/s)
480 preci3d, & ! ice precipitation rate at all levels (kg/m2/s)
481 precs3d, & ! snow precipitation rate at all levels (kg/m2/s)
482 precg3d, & ! graupel precipitation rate at all levels (kg/m2/s)
483 prech3d ! graupel precipitation rate at all levels (kg/m2/s)
484 !NUWRF JJS 20140225 ^^^^^
486 REAL, DIMENSION( ims:ime , kms:kme , jms:jme ),INTENT(INOUT), OPTIONAL :: th_old,qv_old
487 REAL,DIMENSION(ims:ime,kms:kme,jms:jme,num_scalar),INTENT(INOUT), OPTIONAL :: scalar
489 REAL, DIMENSION(ims:ime,kms:kme,jms:jme,num_sbmradar),INTENT(INOUT) :: sbmradar
491 INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(IN), OPTIONAL:: IVGTYP
492 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN), OPTIONAL :: XLAT, XLONG
495 !Data for CAMMGMP scheme
496 REAL,INTENT(IN), OPTIONAL ::accum_mode,aitken_mode,coarse_mode
497 !1D variables required for CAMMGMP scheme
498 REAL , DIMENSION( kms:kme ) , &
499 INTENT(IN ) , OPTIONAL :: fnm, & !Factors for interpolation at "w" grid (interfaces)
501 !2D variables required for CAMMGMP scheme
502 REAL, DIMENSION( ims:ime, jms:jme ), &
503 INTENT(IN), OPTIONAL :: &
504 qfx, & !Moisture flux at surface (kg m-2 s-1)
505 rliq !Vertically-integrated reserved cloud condensate(m/s)
508 integer, intent (in), optional :: multi_perturb
509 logical, intent (in), optional :: pert_thom
510 real, intent (in), optional :: pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, pert_thom_ni
511 real, dimension(ims:ime, kms:kme, jms:jme ), intent (in), optional :: perts_qvapor, perts_qcloud, perts_qice, &
512 perts_qsnow, perts_ni
513 real, dimension(:, :, :), allocatable :: qv_tmp, qc_tmp, qi_tmp, qs_tmp, qni_tmp
515 !3D variables required for CAMMGMP scheme
516 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
517 INTENT(IN), OPTIONAL :: &
518 dlf, & !Detraining cloud water tendendcy
519 dlf2, & !dq/dt due to export of cloud water into env by shal conv (kg/kg/s)
520 t_phy, & !Temprature at the mid points (K)
521 p_hyd, & !Hydrostatic pressure(Pa)
522 p8w_hyd, & !Hydrostatic Pressure at level interface (Pa)
523 z_at_mass, & !Height above sea level at grid cell center (m)
524 z_at_w, & !Height above sea level at layer interfaces (m)
525 tke_pbl, & !Turbulence kinetic energy
526 pblh, & !Planetary boundary layer height (m)
527 turbtype3d, & !Turbulent interface types [ no unit ]
528 smaw3d, & !Normalized Galperin instability function for momentum [no units]
529 alt, & !inverse density(m3/kg)
530 icwmrsh3d, & !Shallow cumulus in-cloud water mixing ratio (kg/m2)
531 icwmrdp3d, & !Deep Convection in-cloud water mixing ratio (kg/m2)
532 shfrc3d, & !Shallow cloud fraction
533 cmfmc3d, & !Deep + Shallow Convective mass flux [ kg /s/m^2 ]
534 cmfmc2_3d !Shallow convective mass flux [ kg/s/m^2 ]
535 #if ( WRF_CHEM == 1 )
536 !4D variables required for CAMMGMP scheme
537 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme,ntot_amode_cam_mam ), &
543 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
544 INTENT(INOUT) , OPTIONAL :: &
545 cldfra_old_mp, & !Old Cloud fraction for CAMMGMP microphysics only
547 lcd_old_mp !Old liquid cloud fraction
549 #if ( WRF_CHEM == 1 )
550 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_chem), &
552 chem !Chem array for CAMMGMP scheme Prognostic aerosols
555 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
556 INTENT(INOUT) , OPTIONAL:: &
557 wsedl3d, & !Sedimentation velocity of stratiform liquid cloud droplet (m/s)
558 cldfra_mp, & !Old Cloud fraction for CAMMGMP microphysics only
559 cldfra_mp_all, & !Old Cloud fraction for CAMMGMP microphysics only
560 cldfrai, & !Old Cloud fraction for CAMMGMP microphysics only
561 cldfral, & !Old Cloud fraction for CAMMGMP microphysics only
562 lradius, & !Old Cloud fraction for CAMMGMP microphysics only
563 iradius, & !Old Cloud fraction for CAMMGMP microphysics only
568 #if ( WRF_CHEM == 1 )
569 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
570 INTENT(INOUT), OPTIONAL :: &
571 qme3d, & !Net condensation rate (kg/kg/s)
572 prain3d, & !Rate of conversion of condensate to precipitation (kg/kg/s)
573 nevapr3d, & !Evaporation rate of rain + snow (kg/kg/s)
574 rate1ord_cw2pr_st3d !1st order rate for direct conversion of strat. cloud water to precip (1/s)
577 REAL, INTENT(INOUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
578 F_ICE_PHY,F_RAIN_PHY,F_RIMEF_PHY
579 !!$#if ( WRF_CHEM == 1 )
580 ! REAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
581 REAL, OPTIONAL, INTENT(OUT), DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
583 !!$ REAL, DIMENSION(ims:ime, kms:kme, jms:jme ) :: &
585 qlsink, & ! cloud water sink (/s)
586 precr, & ! rain precipitation rate at all levels (kg/m2/s)
587 preci, & ! ice precipitation rate at all levels (kg/m2/s)
588 precs, & ! snow precipitation rate at all levels (kg/m2/s)
589 precg ! graupel precipitation rate at all levels (kg/m2/s)
593 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN) :: XLAND
594 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(IN), OPTIONAL :: SNOWH
596 REAL , DIMENSION( ims:ime , jms:jme ) , INTENT(OUT) :: SR
598 REAL, INTENT(IN ) :: dt,dx,dy
600 INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: LOWLYR
605 REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: refl_10cm
606 REAL, OPTIONAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: & ! for ntu3m
607 qdcn_curr,qtcn_curr,qccn_curr,qrcn_curr,qnin_curr, & ! for ntu3m
608 fi_curr,fs_curr,vi_curr,vs_curr,vg_curr,ai_curr, & ! for ntu3m
609 as_curr,ag_curr,ah_curr,i3m_curr ! for ntu3m
610 LOGICAL, OPTIONAL :: f_qdcn,f_qtcn,f_qccn,f_qrcn,f_qnin,f_fi,f_fs, & ! for ntu3m
611 f_vi,f_vs,f_vg,f_ai,f_as,f_ag,f_ah,f_i3m ! for ntu3m
612 REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: vmi3d,di3d,rhopo3d, & ! for P3
613 vmi3d_2,di3d_2,rhopo3d_2, & ! for P3
614 phii3d, & ! for Jensen ISHMAEL
615 phii3d_2, & ! for Jensen ISHMAEL
616 vmi3d_3,di3d_3,rhopo3d_3, & ! for Jensen ISHMAEL
617 phii3d_3, & ! for Jensen ISHMAEL
618 itype,itype_2,itype_3 ! for Jensen ISHMAEL
619 LOGICAL, OPTIONAL, INTENT(IN ) :: channel_switch
620 REAL, OPTIONAL, INTENT(INOUT ) :: naer ! aerosol number concentration (/kg)
621 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) , OPTIONAL :: qnwfa2d, qnifa2d, qnbca2d, &
623 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
627 ,cldfra, cldfra_old, exch_h &
628 ,qv_curr,qc_curr,qr_curr,qi_curr,qs_curr,qg_curr &
629 ,qt_curr,qndrop_curr,qni_curr,qh_curr,qnh_curr &
630 ,qns_curr,qnr_curr,qng_curr,qnn_curr,qnc_curr &
631 ,qic_curr,qip_curr,qid_curr &
632 ,qnic_curr,qnip_curr,qnid_curr &
633 ,qzr_curr,qzi_curr,qzs_curr,qzg_curr,qzh_curr &
634 ,qir_curr,qib_curr & ! for P3
635 ,qi2_curr,qni2_curr,qir2_curr,qib2_curr & ! for P3
636 ,qvoli_curr,qaoli_curr & ! for Jensen ISHMAEL
637 ,qvoli2_curr,qaoli2_curr & ! for Jensen ISHMAEL
638 ,qi3_curr,qni3_curr,qvoli3_curr,qaoli3_curr & ! for Jensen ISHMAEL
639 ,effr_curr,ice_effr_curr,tot_effr_curr &
640 ,qic_effr_curr,qip_effr_curr,qid_effr_curr &
641 ,kext_ql,kext_qs,kext_qg &
643 ,kext_qic,kext_qip,kext_qid,tempc,height &
644 ,kext_ft_qic,kext_ft_qip,kext_ft_qid &
645 ,kext_ft_qs,kext_ft_qg &
646 ,qnwfa_curr,qnifa_curr,qnbca_curr & ! Added by G. Thompson
647 ,qvolg_curr,qvolh_curr, qrimef_curr
649 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
651 INTENT(IN) :: qrcuten, qscuten, qicuten, qccuten
652 INTEGER, INTENT(IN), optional :: cu_used
653 #if ( WRF_CHEM == 1 )
654 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
655 INTENT(INOUT) :: rainprod, evapprod
656 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
657 INTENT(INOUT) :: qv_b4mp, qc_b4mp, qi_b4mp, qs_b4mp
660 ! Added RI_CURR similar to microphysics fields above
661 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
663 INTENT(INOUT) :: ri_curr
666 REAL, DIMENSION(ims:ime, kms:kme, jms:jme ), &
672 REAL, DIMENSION( ims:ime , jms:jme ), &
685 ! NUWRF JJS 20110525 vvvvv
686 ! for inline Gocart coupling
688 INTEGER, PARAMETER :: num_go = 14 ! number of the gocart aerosol species
689 REAL, DIMENSION( ims:ime, kms:kme, jms:jme, num_go) :: aero
690 REAL, DIMENSION( ims:ime, kms:kme, jms:jme), INTENT(OUT) :: icn_diag
691 REAL, DIMENSION( ims:ime, kms:kme, jms:jme), INTENT(OUT) :: nc_diag
692 integer, intent(in) :: gsfcgce_gocart_coupling ! EMK
693 REAL, PARAMETER :: frac(4)=(/ 0.01053,0.08421,0.25263,0.65263 /) !fraction for fine dust
695 ! NUWRF JJS 20110525 ^^^^^
700 INTEGER,OPTIONAL,INTENT(IN ) :: id
702 REAL , DIMENSION( ims:ime , jms:jme ) , OPTIONAL , &
705 REAL, DIMENSION (:), OPTIONAL, INTENT(INOUT) :: mp_restart_state &
706 ,tbpvs_state,tbpvs0_state
709 LOGICAL, OPTIONAL :: f_qv,f_qc,f_qr,f_qi,f_qs,f_qg,f_qndrop,f_qni,f_qt &
710 ,f_qns,f_qnr,f_qng,f_qnn,f_qnc,f_qh,f_qnh,f_qzr &
711 ,f_effr,f_ice_effr,f_tot_effr &
712 ,f_qic_effr,f_qip_effr,f_qid_effr &
714 ,f_qnic,f_qnip,f_qnid &
715 ,f_qzi,f_qzs,f_qzg,f_qzh,f_qvolg,f_qvolh &
717 ,f_qir,f_qib & ! for P3
718 ,f_qi2,f_qni2,f_qir2,f_qib2 & ! for P3
719 ,f_qvoli,f_qaoli & ! for Jensen ISHMAEL
720 ,f_qvoli2,f_qaoli2 & ! for Jensen ISHMAEL
721 ,f_qi3,f_qni3,f_qvoli3,f_qaoli3 & ! for Jensen ISHMAEL
722 ,f_qnwfa, f_qnifa, f_qnbca ! Added by G. Thompson
725 LOGICAL, OPTIONAL, INTENT(IN) :: diagflag
726 INTEGER, OPTIONAL, INTENT(IN) :: ke_diag ! tells reflectivity calculation whether to do full depth or only k=1
727 REAL, INTENT(IN) :: ccn_conc ! RAS
728 INTEGER, OPTIONAL, INTENT(IN) :: do_radar_ref
729 REAL, DIMENSION(ims:ime,kms:kme,jms:jme), INTENT(INOUT) :: & ! G. Thompson
730 re_cloud, re_ice, re_snow
731 INTEGER, INTENT(IN):: has_reqc, has_reqi, has_reqs
733 INTEGER, INTENT(IN ) :: aercu_opt
735 INTEGER, OPTIONAL, INTENT(IN ) :: PBL
736 INTEGER, INTENT(IN ) :: no_src_types_cu
737 REAL, INTENT(IN ) :: aercu_fct
738 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme, no_src_types_cu), INTENT(INOUT) &
740 REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme), INTENT(INOUT) &
756 REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme), INTENT(INOUT) &
758 REAL, OPTIONAL, DIMENSION( ims:ime , kms:kme, jms:jme ) , INTENT(OUT) :: mskf_refl_10cm
761 ! REAL , DIMENSION( ims:ime , jms:jme ), OPTIONAL, INTENT(INOUT) :: lwp
765 INTEGER :: i,j,k,its,ite,jts,jte,ij,sz,n
767 LOGICAL :: nssl_progn = .false.
768 REAL :: z0, z1, z2, w1, w2
770 integer, parameter :: ntot = 50
775 REAL, DIMENSION( ims:ime , jms:jme ), OPTIONAL, INTENT(IN):: IRRIGATION !ARI
776 REAL, OPTIONAL, INTENT(IN):: irr_daily_amount, julian_in, xtime, gmt
777 INTEGER, OPTIONAL, INTENT(IN ):: sf_surf_irr_scheme, irr_start_hour, irr_num_hours, &
778 irr_start_julianday,irr_end_julianday,irr_freq,irr_ph
779 REAL, PARAMETER :: PI_GRECO=3.14159
780 INTEGER :: end_hour,a,b,xt24,irr_day,timing
781 REAL :: constants_irrigation,tloc,irr_start,phase
782 INTEGER, OPTIONAL, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT) :: irr_rand_field
784 !---------------------------------------------------------------------
785 ! check for microphysics type. We need a clean way to
786 ! specify these things!
787 !---------------------------------------------------------------------
790 IF ( PRESENT ( channel_switch ) ) channel = channel_switch
792 if (mp_physics .eq. 0) return
799 ! set this to true to print out the global max/min for W on each time step.
801 wmax = maxval( w(ips:ipe,kps:kpe,jps:jpe) )
802 wmin = minval( w(ips:ipe,kps:kpe,jps:jpe) )
803 #if ( defined(DM_PARALLEL) && ! defined(STUBMPI) )
804 wmax = wrf_dm_max_real ( wmax )
805 wmin = wrf_dm_min_real ( wmin )
807 WRITE( wrf_err_message , * ) 'microphysics_driver: GLOBAL w max/min = ', wmax, wmin
808 CALL wrf_message ( wrf_err_message )
811 #ifdef XEON_OPTIMIZED_WSM5
812 ! the OpenMP loops are inside the scheme when running on MIC
813 IF ( mp_physics .EQ. WSM5SCHEME ) THEN
818 its = max(ips,ids+sz)
819 ite = min(ipe,ide-1-sz)
821 jts = max(jps,jds+sz)
822 jte = min(jpe,jde-1-sz)
831 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
832 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
833 ,RD=r_d,RV=r_v,T0C=svpt0 &
834 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
835 ,XLS=xls, XLV0=xlv, XLF0=xlf &
836 ,DEN0=rhoair0, DENR=rhowater &
837 ,CLIQ=cliq,CICE=cice,PSAT=psat &
838 ,RAIN=rainnc ,RAINNCV=rainncv &
839 ,SNOW=snownc ,SNOWNCV=snowncv &
841 ,REFL_10CM=refl_10cm &
843 ,do_radar_ref=do_radar_ref &
844 ,has_reqc=has_reqc & ! for radiation +
849 ,re_snow=re_snow & ! for radiation -
850 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
851 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
852 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
859 !$OMP PRIVATE ( ij, its, ite, jts, jte, i,j,k,n )
861 DO ij = 1 , num_tiles
863 its = max(i_start(ij),ids)
864 ite = min(i_end(ij),ide-1)
866 its = max(i_start(ij),ids+sz)
867 ite = min(i_end(ij),ide-1-sz)
869 jts = max(j_start(ij),jds+sz)
870 jte = min(j_end(ij),jde-1-sz)
873 sf_surf_irr: SELECT CASE(sf_surf_irr_scheme)
875 CALL sprinkler_irrigation( julian_in &
876 & ,irrigation, irr_daily_amount,rho,dz8w &
877 & ,irr_start_hour,irr_num_hours,irr_start_julianday &
878 & ,irr_end_julianday,irr_freq,irr_ph,qr_curr &
879 & ,gmt,xtime,dt,irr_rand_field &
880 & ,ids,ide, jds,jde & ! domain dims
881 & ,ims,ime, jms,jme, kms,kme & ! memory dims
882 & ,its,ite, jts,jte )
883 END SELECT sf_surf_irr
888 ! 2009-06009 rce - zero all these for safety
889 IF( PRESENT(qlsink) ) qlsink(its:ite,kts:kte,jts:jte) = 0.
890 IF( PRESENT(precr ) ) precr(its:ite,kts:kte,jts:jte) = 0.
891 IF( PRESENT(preci ) ) preci(its:ite,kts:kte,jts:jte) = 0.
892 IF( PRESENT(precs ) ) precs(its:ite,kts:kte,jts:jte) = 0.
893 IF( PRESENT(precg ) ) precg(its:ite,kts:kte,jts:jte) = 0.
896 IF( PRESENT(chem_opt) .AND. PRESENT(progn) ) THEN
898 ! ERM: check whether to use built-in droplet nucleation or use qndrop from CHEM
899 IF ( mp_physics==NSSL_2MOMCCN .or. mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG ) THEN
900 IF ( progn > 0 ) THEN
901 IF ( .not. (chem_opt == 0 .or. chem_opt == 401) ) nssl_progn = .true.
903 nssl_progn = .false. ! use NUCOND for droplet nucleation
907 !Add pass for dust-only wrf-chem option - RAS
908 IF( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==LINSCHEME .OR. mp_physics==MORR_TWO_MOMENT)) THEN
909 IF( PRESENT( QNDROP_CURR ) ) THEN
910 CALL wrf_debug ( 100 , 'microphysics_driver: calling prescribe_aerosol_mixactivate' )
911 ! 06-nov-2005 rce - id & itimestep added to arg list
912 call prescribe_aerosol_mixactivate ( &
913 id, itimestep, dt, naer, &
914 ccn_conc, chem_opt, & !RAS13.1
915 rho, th, pi_phy, w, cldfra, cldfra_old, &
916 z, dz8w, p8w, t8w, exch_h, &
917 qv_curr, qc_curr, qi_curr, qndrop_curr, &
919 ids,ide, jds,jde, kds,kde, &
920 ims,ime, jms,jme, kms,kme, &
921 its,ite, jts,jte, kts,kte, &
922 F_QC=f_qc, F_QI=f_qi )
924 ELSEIF ( (chem_opt==0 .OR. chem_opt==401) .AND. progn==1 .AND. (mp_physics==NSSL_2MOMCCN .or. &
925 mp_physics==NSSL_2MOM .or. mp_physics==NSSL_2MOMG)) THEN
926 ! Do nothing here for the moment. Use activation of CCN within the NSSL_2MOM scheme instead, based on nssl_cccn namelist value.
927 ELSEIF ( progn==1 .AND. mp_physics/=LINSCHEME .AND. mp_physics/=MORR_TWO_MOMENT &
928 .AND. mp_physics/=NSSL_2MOM .AND. mp_physics/=NSSL_2MOMCCN .AND. mp_physics/=NSSL_2MOMG ) THEN
929 call wrf_error_fatal( &
930 "SETTINGS ERROR: Prognostic cloud droplet number can only be used with the mp_physics=LINSCHEME or MORRISON or NSSL_2MOM.")
935 !NUWRF JJS 20110525 vvvvv
936 ! Pack gocart aerosol species
937 ! All aerosol species in chem are in "ug/kg-dryair"
938 ! and conerted to (g/m**3)
944 aero(i,k,j, 1) = max(0.0, chem(i,k,j,p_sulf)*1.0e-6*p(i,k,j)* &
945 96.0/(8.314*th(i,k,j)*pi_phy(i,k,j))) ! 1 = SO4
946 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
947 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
948 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
949 aero(i,k,j, 5) = max(0.0, chem(i,k,j,p_seas_1)*1.0e-6*rho(i,k,j)) ! 5 = SS1
950 aero(i,k,j, 6) = max(0.0, (chem(i,k,j,p_seas_2)+chem(i,k,j,p_seas_3)+ &
951 chem(i,k,j,p_seas_4))*1.0e-6*rho(i,k,j)) ! 6 = SS2+SS3+SS4
952 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
953 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
954 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
955 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
956 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
957 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
958 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
959 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
963 !NUWRF JJS 20110525 ^^^^^
966 micro_select: SELECT CASE(mp_physics)
969 CALL wrf_debug ( 100 , 'microphysics_driver: calling kessler' )
970 IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND. &
971 PRESENT( QR_CURR ) .AND. &
972 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
979 ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp &
980 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
981 ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater &
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 &
989 CALL wrf_error_fatal ( 'arguments not present for calling kessler' )
992 CASE (MKESSLERSCHEME)
993 CALL wrf_debug ( 100 , 'microphysics_driver: calling mkessler' )
994 IF ( PRESENT( QV_CURR ) .AND. PRESENT( QC_CURR ) .AND. &
995 PRESENT( QR_CURR ) .AND. &
996 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
1003 !whl P is not recomputed in the HL' Kessler; need be added here
1006 ,RHO=rho, PII=pi_phy,DT_IN=dt, Z=z, XLV=xlv, CP=cp &
1007 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
1008 ,SVP3=svp3,SVPT0=svpt0,RHOWATER=rhowater &
1010 ,RAINNC=rainnc,RAINNCV=rainncv &
1011 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1012 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1013 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1016 CALL wrf_error_fatal ( 'arguments not present for calling mkessler' )
1021 if (pert_thom .and. multi_perturb == 1) then
1022 allocate (qv_tmp(its:ite, kts:kte, jts:jte))
1023 allocate (qc_tmp(its:ite, kts:kte, jts:jte))
1024 allocate (qi_tmp(its:ite, kts:kte, jts:jte))
1025 allocate (qs_tmp(its:ite, kts:kte, jts:jte))
1026 allocate (qni_tmp(its:ite, kts:kte, jts:jte))
1028 call Add_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1029 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1030 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1031 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1034 CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )
1035 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1036 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1037 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1038 PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND. &
1039 PRESENT( QNC_CURR) .AND. PRESENT ( QNWFA_CURR) .AND. &
1040 PRESENT( QNIFA_CURR).AND.PRESENT ( QNWFA2D) .AND. &
1041 PRESENT( QNIFA2D) .AND. &
1042 PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND. &
1043 PRESENT( GRAUPELNC).AND. PRESENT ( GRAUPELNCV) .AND. &
1044 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
1045 #if ( WRF_CHEM == 1 )
1046 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
1047 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
1048 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
1049 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
1051 CALL mp_gt_driver( &
1067 aer_init_opt=config_flags%aer_init_opt, &
1068 wif_input_opt=config_flags%wif_input_opt, &
1075 ITIMESTEP=itimestep, &
1080 GRAUPELNC=GRAUPELNC, &
1081 GRAUPELNCV=GRAUPELNCV, &
1083 #if ( WRF_CHEM == 1 )
1084 WETSCAV_ON=config_flags%wetscav_onoff == 1, &
1085 RAINPROD=rainprod, &
1086 EVAPPROD=evapprod, &
1088 REFL_10CM=refl_10cm, &
1089 diagflag=diagflag, &
1090 ke_diag = ke_diag, &
1091 do_radar_ref=do_radar_ref, &
1092 re_cloud=re_cloud, &
1095 has_reqc=has_reqc, & ! G. Thompson
1096 has_reqi=has_reqi, & ! G. Thompson
1097 has_reqs=has_reqs, & ! G. Thompson
1098 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1099 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1100 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
1102 if (pert_thom .and. multi_perturb == 1) then
1103 call Remove_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1104 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1105 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1106 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1111 deallocate (qni_tmp)
1114 IF (config_flags%aer_fire_emit_opt.gt.0) then
1115 CALL wrf_debug ( 200 , ' call fire_emis_simple_plumerise' )
1116 CALL fire_emis_simple_plumerise (config_flags%wif_fire_inj, config_flags%aer_fire_emit_opt &
1117 ,z_at_mass, pblh, qnwfa_curr, qnbca_curr &
1118 ,qnocbb2d, qnbcbb2d, dt, ids, ide, jds, jde, kds, kde &
1119 ,ims, ime, jms, jme, kms, kme, its, ite, jts, jte, kts, kte )
1123 CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
1127 CALL wrf_debug ( 100 , 'microphysics_driver: calling thompson' )
1128 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1129 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1130 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1131 PRESENT( QNR_CURR) .AND. PRESENT ( QNI_CURR) .AND. &
1132 ! PRESENT( SNOWNC) .AND. PRESENT ( SNOWNCV) .AND. &
1133 ! PRESENT( GRAUPELNC) .AND. PRESENT ( GRAUPELNCV) .AND. &
1134 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
1135 #if ( WRF_CHEM == 1 )
1136 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
1137 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
1138 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
1139 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
1141 if (pert_thom .and. multi_perturb == 1) then
1142 allocate (qv_tmp(its:ite, kts:kte, jts:jte))
1143 allocate (qc_tmp(its:ite, kts:kte, jts:jte))
1144 allocate (qi_tmp(its:ite, kts:kte, jts:jte))
1145 allocate (qs_tmp(its:ite, kts:kte, jts:jte))
1146 allocate (qni_tmp(its:ite, kts:kte, jts:jte))
1148 call Add_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1149 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1150 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1151 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1154 CALL mp_gt_driver( &
1169 ITIMESTEP=itimestep, &
1174 GRAUPELNC=GRAUPELNC, &
1175 GRAUPELNCV=GRAUPELNCV, &
1177 #if ( WRF_CHEM == 1 )
1178 WETSCAV_ON=config_flags%wetscav_onoff == 1, &
1179 RAINPROD=rainprod, &
1180 EVAPPROD=evapprod, &
1182 REFL_10CM=refl_10cm, &
1183 diagflag=diagflag, &
1184 ke_diag = ke_diag, &
1185 do_radar_ref=do_radar_ref, &
1186 re_cloud=re_cloud, & ! G. Thompson
1187 re_ice=re_ice, & ! G. Thompson
1188 re_snow=re_snow, & ! G. Thompson
1189 has_reqc=has_reqc, & ! G. Thompson
1190 has_reqi=has_reqi, & ! G. Thompson
1191 has_reqs=has_reqs, & ! G. Thompson
1192 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1193 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1194 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte)
1196 if (pert_thom .and. multi_perturb == 1) then
1197 call Remove_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
1198 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
1199 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
1200 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
1205 deallocate (qni_tmp)
1209 CALL wrf_error_fatal ( 'arguments not present for calling thompson_et_al' )
1213 CALL wrf_debug(100, 'microphysics_driver: calling ntu')
1214 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
1215 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
1216 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
1217 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV )) THEN ! ....
1218 CALL mp_ntu(ITIMESTEP=itimestep,TH=th,P=p,DZ=dz8w, &
1219 W=w,PII=pi_phy,DT_MP=dt,SR=sr,QV=qv_curr, &
1220 QC=qc_curr,QR=qr_curr,QI=qi_curr,QS=qs_curr, &
1221 QG=qg_curr,QH=qh_curr,NC=qnc_curr,NR=qnr_curr, &
1222 NI=qni_curr,NS=qns_curr,NG=qng_curr, &
1223 NH=qnh_curr,QDCN=qdcn_curr,QTCN=qtcn_curr, &
1224 QCCN=qccn_curr,QRCN=qrcn_curr,QNIN=qnin_curr, &
1225 FI=fi_curr,FS=fs_curr,VI=vi_curr,VS=vs_curr, &
1226 VG=vg_curr,AI=ai_curr,AS=as_curr,AG=ag_curr, &
1227 AH=ah_curr,I3M=i3m_curr,RAINNC=rainnc, &
1228 RAINNCV=rainncv,SNOWNC=snownc,SNOWNCV=snowncv, &
1229 GRAPNC=graupelnc,GRAPNCV=graupelncv, &
1230 HAILNC=hailnc,HAILNCV=hailncv, &
1231 IDS=ids,IDE=ide,JDS=jds,JDE=jde,KDS=kds,KDE=kde, &
1232 IMS=ims,IME=ime,JMS=jms,JME=jme,KMS=kms,KME=kme, &
1233 ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte)
1235 Call wrf_error_fatal( 'arguments not present for calling ntu')
1239 # if ( BUILD_SBM_FAST == 1 )
1240 CASE (FAST_KHAIN_LYNN_SHPUND)
1241 CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )
1242 CALL fast_sbm(W=w,U=u,V=v,TH_OLD=th_old &
1243 ,CHEM_new=scalar,N_CHEM=num_scalar &
1244 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy &
1245 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p &
1246 ,PI_PHY=pi_phy,TH_PHY=th &
1247 ,xland=xland,domain_id=id &
1264 ,sbmradar=sbmradar,num_sbmradar=num_sbmradar &
1265 ,sbm_diagnostics=sbm_diagnostics &
1266 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1267 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1268 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1269 ,diagflag=diagflag & ! added for radar reflectivity
1274 ,GRAUPELNC=graupelnc &
1275 ,GRAUPELNCV=graupelncv &
1281 CASE (FULL_KHAIN_LYNN)
1282 CALL wrf_debug ( 100 , 'microphysics_driver: calling sbm' )
1283 CALL sbm(W=w,U=u,V=v,TH_OLD=th_old &
1284 ,CHEM_new=scalar,N_CHEM=num_scalar &
1285 ,ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy &
1286 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
1311 ,ICE_EFFR=ice_effr_curr &
1312 ,TOT_EFFR=tot_effr_curr &
1313 ,QIC_EFFR=qic_effr_curr &
1314 ,QIP_EFFR=qip_effr_curr &
1315 ,QID_EFFR=qid_effr_curr &
1323 ,kext_qic=kext_qic &
1324 ,kext_qip=kext_qip &
1325 ,kext_qid=kext_qid &
1326 ,kext_ft_qic=kext_ft_qic &
1327 ,kext_ft_qip=kext_ft_qip &
1328 ,kext_ft_qid=kext_ft_qid &
1329 ,kext_ft_qs=kext_ft_qs &
1330 ,kext_ft_qg=kext_ft_qg &
1331 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1332 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1333 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1334 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
1335 ,diagflag=diagflag & ! added for radar reflectivity
1336 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
1341 ,GRAUPELNC=graupelnc &
1342 ,GRAUPELNCV=graupelncv &
1350 CASE (JENSEN_ISHMAEL)
1351 CALL wrf_debug(100, 'microphysics_driver: jensen_ishmael ')
1352 IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1353 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
1354 PRESENT (QI_CURR).AND. PRESENT (QNI_CURR) .AND. &
1355 PRESENT (QVOLI_CURR) .AND. PRESENT (QAOLI_CURR) .AND. &
1356 PRESENT (QI2_CURR).AND. PRESENT (QNI2_CURR) .AND. &
1357 PRESENT (QVOLI2_CURR) .AND. PRESENT (QAOLI2_CURR) .AND. &
1358 PRESENT (QI3_CURR).AND. PRESENT (QNI3_CURR) .AND. &
1359 PRESENT (QVOLI3_CURR).AND. PRESENT (QAOLI3_CURR)) THEN
1360 CALL mp_jensen_ishmael( &
1361 ITIMESTEP=itimestep, & !*
1372 AI1=qvoli_curr, & !*
1373 CI1=qaoli_curr, & !*
1376 AI2=qvoli2_curr, & !*
1377 CI2=qaoli2_curr, & !*
1380 AI3=qvoli3_curr, & !*
1381 CI3=qaoli3_curr, & !*
1382 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1383 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1384 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte, &
1389 diag_effc3d=re_cloud, &
1390 diag_effi3d=re_ice, &
1391 diag_dbz3d=refl_10cm, &
1392 diag_vmi3d_1=vmi3d, &
1394 diag_rhopo3d_1=rhopo3d, &
1395 diag_phii3d_1=phii3d, &
1396 diag_vmi3d_2=vmi3d_2, &
1397 diag_di3d_2=di3d_2, &
1398 diag_rhopo3d_2=rhopo3d_2, &
1399 diag_phii3d_2=phii3d_2, &
1400 diag_vmi3d_3=vmi3d_3, &
1401 diag_di3d_3=di3d_3, &
1402 diag_rhopo3d_3=rhopo3d_3, &
1403 diag_phii3d_3=phii3d_3, &
1404 diag_itype_1=itype, &
1405 diag_itype_2=itype_2, &
1406 diag_itype_3=itype_3 &
1409 Call wrf_error_fatal( 'arguments not present for calling jensen_ishamel')
1412 CASE (MORR_TWO_MOMENT)
1413 CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment')
1414 IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1415 PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1416 PRESENT (QS_CURR) .AND. PRESENT (QG_CURR) .AND. &
1417 PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1418 PRESENT (QNS_CURR) .AND. PRESENT (QNI_CURR).AND. &
1419 PRESENT (QNR_CURR) .AND. PRESENT (QNG_CURR).AND. &
1420 PRESENT (QSCUTEN).AND. &
1421 PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1422 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1423 PRESENT ( W ) ) THEN
1424 CALL mp_morr_two_moment( &
1425 ITIMESTEP=itimestep, & !*
1434 NS=qns_curr, & !* ! VVT
1435 NR=qnr_curr, & !* ! VVT
1436 NG=qng_curr, & !* ! VVT
1445 ,RAINNCV=RAINNCV & !*
1447 ,SNOWNCV=SNOWNCV & !*
1448 ,GRAUPELNC=GRAUPELNC & !*
1449 ,GRAUPELNCV=GRAUPELNCV & !*
1451 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
1452 ,diagflag=diagflag & ! added for radar reflectivity
1453 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
1454 ,qrcuten=qrcuten & ! hm
1455 ,qscuten=qscuten & ! hm
1456 ,qicuten=qicuten & ! hm
1457 ,F_QNDROP=f_qndrop & ! hm for wrf-chem
1458 ,QNDROP=qndrop_curr & ! hm for wrf-chem
1459 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1460 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1461 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1462 ,QLSINK=qlsink & ! jdf for wrf-chem
1463 #if ( WRF_CHEM == 1 )
1464 ,WETSCAV_ON=config_flags%wetscav_onoff == 1 &
1465 ,EVAPPROD=evapprod,RAINPROD=rainprod &
1467 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & ! jdf for wrf-chem
1470 Call wrf_error_fatal( 'arguments not present for calling morrison two moment')
1475 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category')
1476 ! IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1477 ! PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1478 ! PRESENT (QNG_CURR) .AND. &
1479 ! PRESENT (QNC_CURR) .AND. PRESENT (QNI_CURR).AND. &
1480 ! PRESENT (QNR_CURR) .AND. &
1481 ! PRESENT (QSCUTEN).AND. &
1482 ! PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1483 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1484 ! PRESENT (Z ) .AND.PRESENT ( W ) ) THEN
1486 CALL mp_p3_wrapper_wrf( &
1487 ITIMESTEP=itimestep, &
1510 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1511 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1512 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1513 ,diag_zdbz_3d=refl_10cm, &
1514 diag_effc_3d=re_cloud, &
1515 diag_effi_3d=re_ice &
1516 ,diag_vmi_3d=vmi3d &
1518 ,diag_rhopo_3d=rhopo3d &
1521 ! Call wrf_error_fatal( 'arguments not present for calling p3 one category')
1524 CASE (P3_1CATEGORY_NC)
1525 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category')
1526 ! IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1527 ! PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1528 ! PRESENT (QNG_CURR) .AND. &
1529 ! PRESENT (QNC_CURR) .AND. PRESENT (QNI_CURR).AND. &
1530 ! PRESENT (QNR_CURR) .AND. &
1531 ! PRESENT (QSCUTEN).AND. &
1532 ! PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1533 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1534 ! PRESENT (Z ) .AND.PRESENT ( W ) ) THEN
1536 CALL mp_p3_wrapper_wrf( &
1537 ITIMESTEP=itimestep, &
1561 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1562 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1563 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1564 ,diag_zdbz_3d=refl_10cm, &
1565 diag_effc_3d=re_cloud, &
1566 diag_effi_3d=re_ice &
1567 ,diag_vmi_3d=vmi3d &
1569 ,diag_rhopo_3d=rhopo3d &
1572 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category')
1573 ! IF (PRESENT (QV_CURR) .AND. PRESENT (QC_CURR) .AND. &
1574 ! PRESENT (QR_CURR) .AND. PRESENT (QI_CURR) .AND. &
1575 ! PRESENT (QNG_CURR) .AND. &
1576 ! PRESENT (QNC_CURR) .AND. PRESENT (QNI_CURR).AND. &
1577 ! PRESENT (QNR_CURR) .AND. &
1578 ! PRESENT (QSCUTEN).AND. &
1579 ! PRESENT (QRCUTEN) .AND. PRESENT (QICUTEN).AND. &
1580 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1581 ! PRESENT (Z ) .AND.PRESENT ( W ) ) THEN
1583 CALL mp_p3_wrapper_wrf_2cat( &
1584 ITIMESTEP=itimestep, &
1595 QIR2_3d=qir2_curr, &
1596 QNI2_3d=qni2_curr, &
1597 QIB2_3d=qib2_curr, &
1612 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1613 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1614 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1615 ,diag_zdbz_3d=refl_10cm, &
1616 diag_effc_3d=re_cloud, &
1617 diag_effi_3d=re_ice &
1618 ,diag_vmi_3d=vmi3d &
1620 ,diag_rhopo_3d=rhopo3d &
1621 ,diag_vmi2_3d=vmi3d_2 &
1622 ,diag_di2_3d=di3d_2 &
1623 ,diag_rhopo2_3d=rhopo3d_2 &
1627 CALL wrf_debug(100, 'microphysics_driver: calling p3 one category 3 moment')
1629 CALL mp_p3_wrapper_wrf( &
1630 ITIMESTEP=itimestep, &
1654 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1655 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1656 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1657 ,diag_zdbz_3d=refl_10cm, &
1658 diag_effc_3d=re_cloud, &
1659 diag_effi_3d=re_ice &
1660 ,diag_vmi_3d=vmi3d &
1662 ,diag_rhopo_3d=rhopo3d &
1664 ! not currently output
1665 ! ,diag_dhmax_3d=dhmax3d &
1666 ! ,diag_lami_3d=lami3d &
1667 ! ,diag_mui_3d=mui3d &
1675 CALL wrf_debug(100, 'microphysics_driver: calling morrison two moment')
1676 CALL mp_morr_two_moment_aero( &
1677 ITIMESTEP=itimestep, & !*
1686 NS=qns_curr, & !* ! VVT
1687 NR=qnr_curr, & !* ! VVT
1688 NG=qng_curr, & !* ! VVT
1689 NC=qnc_curr, & ! TWG/amy added nc
1690 KZH=exch_h, & ! TWG/amy add
1699 ,RAINNCV=RAINNCV & !*
1701 ,SNOWNCV=SNOWNCV & !*
1702 ,GRAUPELNC=GRAUPELNC & !*
1703 ,GRAUPELNCV=GRAUPELNCV & !*
1705 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
1706 ,MSKF_REFL_10CM=MSKF_REFL_10CM & ! addef for radar reflectivity TWG 2017
1707 ,diagflag=diagflag & ! added for radar reflectivity
1708 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
1709 ,qrcuten=qrcuten & ! hm
1710 ,qscuten=qscuten & ! hm
1711 ,qicuten=qicuten & ! hm
1712 ,F_QNDROP=f_qndrop & ! hm for wrf-chem
1713 ,QNDROP=qndrop_curr & ! hm for wrf-chem
1714 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1715 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1716 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1717 ,PBL=PBL & ! TWG/amy add
1718 ,aerocu=aerocu & ! TWG add
1719 ,aercu_opt=aercu_opt & ! TWG add
1720 ,aercu_fct=aercu_fct & ! TWG add
1721 ,no_src_types_cu=no_src_types_cu & ! TWG add
1722 ,EFCG=EFCG & ! TWG add
1723 ,EFIG=EFIG & ! TWG add
1724 ,EFSG=EFSG & ! TWG add
1725 ,WACT=WACT & ! TWG add
1726 ,CCN1_GS=CCN1_GS & ! TWG add
1727 ,CCN2_GS=CCN2_GS & ! TWG add
1728 ,CCN3_GS=CCN3_GS & ! TWG add
1729 ,CCN4_GS=CCN4_GS & ! TWG add
1730 ,CCN5_GS=CCN5_GS & ! TWG add
1731 ,CCN6_GS=CCN6_GS & ! TWG add
1732 ,CCN7_GS=CCN7_GS & ! TWG add
1733 ,NR_CU=NR_CU & ! TWG add
1734 ,QR_CU=QR_CU & ! TWG add
1735 ,NS_CU=NS_CU & ! TWG add
1736 ,QS_CU=QS_CU & ! TWG add
1737 ,CU_UAF=CU_UAF & ! TWG add
1738 ,QLSINK=qlsink & ! jdf for wrf-chem
1739 #if ( WRF_CHEM == 1 )
1740 ,WETSCAV_ON=config_flags%wetscav_onoff == 1 &
1741 ,EVAPPROD=evapprod,RAINPROD=rainprod &
1743 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg & ! jdf for wrf-chem
1747 CASE (MILBRANDT2MOM)
1748 CALL wrf_debug(100, 'microphysics_driver: calling milbrandt2mom')
1749 IF (PRESENT (QV_CURR) .AND. &
1750 PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. &
1751 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
1752 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
1753 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
1754 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
1755 PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. &
1756 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1757 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
1758 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
1759 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
1760 PRESENT ( W ) ) THEN
1761 ! PRESENT (ccntype) &
1763 CALL mp_milbrandt2mom_driver( &
1764 ITIMESTEP=itimestep, &
1786 RAINNCV = RAINNCV, &
1788 SNOWNCV = SNOWNCV, &
1790 HAILNCV = HAILNCV, &
1791 GRPLNC = GRAUPELNC, &
1792 GRPLNCV = GRAUPELNCV, &
1794 ! ccntype = ccntype, &
1795 Zet = refl_10cm, & ! HM, 9/22/09 for refl
1796 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1797 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1798 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1801 Call wrf_error_fatal( 'arguments not present for calling milbrandt2mom')
1805 ! CASE (MILBRANDT3MOM)
1806 ! CALL wrf_debug(100, 'microphysics_driver: calling milbrandt3mom')
1807 ! IF (PRESENT (QV_CURR) .AND. &
1808 ! PRESENT (QC_CURR) .AND. PRESENT (QNC_CURR) .AND. &
1809 ! PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. PRESENT (QZR_CURR) .AND. &
1810 ! PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. PRESENT (QZI_CURR) .AND. &
1811 ! PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. PRESENT (QZS_CURR) .AND. &
1812 ! PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. PRESENT (QZG_CURR) .AND. &
1813 ! PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. PRESENT (QZH_CURR) .AND. &
1814 ! PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1815 ! PRESENT ( W ) ) THEN
1816 ! CALL mp_milbrandt3mom_driver( &
1817 ! ITIMESTEP=itimestep, & !*
1842 ! ,RAINNC=RAINNC & !*
1843 ! ,RAINNCV=RAINNCV & !*
1845 ! ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
1846 ! ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
1847 ! ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1850 ! Call wrf_error_fatal( 'arguments not present for calling milbrandt3mom')
1854 CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')
1855 IF (PRESENT (QV_CURR) .AND. &
1856 PRESENT (QC_CURR) .AND. &
1857 PRESENT (QR_CURR) .AND. &
1858 PRESENT (QI_CURR) .AND. &
1859 PRESENT (QS_CURR) .AND. &
1860 PRESENT (QG_CURR) .AND. &
1861 PRESENT (QH_CURR) .AND. &
1862 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1864 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
1865 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
1866 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
1868 PRESENT ( W ) .AND. &
1869 PRESENT (QVOLG_CURR) ) THEN
1872 CALL nssl_2mom_driver( &
1873 ITIMESTEP=itimestep, &
1896 RAINNCV = RAINNCV, &
1898 SNOWNCV = SNOWNCV, &
1900 HAILNCV = HAILNCV, &
1901 GRPLNC = GRAUPELNC, &
1902 GRPLNCV = GRAUPELNCV, &
1905 diagflag = diagflag, &
1906 ke_diag = ke_diag, &
1907 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1908 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1909 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1912 Call wrf_error_fatal( 'arguments not present for calling nssl_1mom')
1917 CALL wrf_debug(100, 'microphysics_driver: calling nssl1mom')
1918 IF (PRESENT (QV_CURR) .AND. &
1919 PRESENT (QC_CURR) .AND. &
1920 PRESENT (QR_CURR) .AND. &
1921 PRESENT (QI_CURR) .AND. &
1922 PRESENT (QS_CURR) .AND. &
1923 PRESENT (QG_CURR) .AND. &
1924 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1926 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
1927 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
1929 PRESENT ( W ) ) THEN
1932 CALL nssl_2mom_driver( &
1933 ITIMESTEP=itimestep, &
1948 RAINNCV = RAINNCV, &
1950 SNOWNCV = SNOWNCV, &
1951 GRPLNC = GRAUPELNC, &
1952 GRPLNCV = GRAUPELNCV, &
1955 diagflag = diagflag, &
1956 ke_diag = ke_diag, &
1957 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
1958 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
1959 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
1962 Call wrf_error_fatal( 'arguments not present for calling nssl_1momlfo')
1966 CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')
1967 IF (PRESENT (QV_CURR) .AND. &
1968 PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR) .AND. &
1969 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
1970 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
1971 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
1972 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
1973 PRESENT (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. &
1974 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
1976 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
1977 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
1978 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
1980 PRESENT ( W ) .AND. &
1981 PRESENT (QVOLG_CURR) .AND. F_QVOLG .AND. &
1982 PRESENT (QVOLH_CURR) .AND. F_QVOLH ) THEN
1985 CALL nssl_2mom_driver( &
1986 ITIMESTEP=itimestep, &
2011 RAINNCV = RAINNCV, &
2013 SNOWNCV = SNOWNCV, &
2015 HAILNCV = HAILNCV, &
2016 GRPLNC = GRAUPELNC, &
2017 GRPLNCV = GRAUPELNCV, &
2020 #if ( WRF_CHEM == 1 )
2021 WETSCAV_ON = config_flags%wetscav_onoff == 1, &
2022 EVAPPROD=evapprod,RAINPROD=rainprod, &
2024 nssl_progn=nssl_progn, &
2025 diagflag = diagflag, &
2026 ke_diag = ke_diag, &
2028 qrcuten=qrcuten, & ! hm
2029 qscuten=qscuten, & ! hm
2030 qicuten=qicuten, & ! hm
2031 qccuten=qccuten, & ! hm
2032 re_cloud=re_cloud, &
2035 has_reqc=has_reqc, & ! ala G. Thompson
2036 has_reqi=has_reqi, & ! ala G. Thompson
2037 has_reqs=has_reqs, & ! ala G. Thompson
2038 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
2039 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
2040 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2044 Call wrf_error_fatal( 'arguments not present for calling nssl_2mom')
2048 CALL wrf_debug(100, 'microphysics_driver: calling nssl2mom')
2049 IF (PRESENT (QV_CURR) .AND. &
2050 PRESENT (QC_CURR) .AND. PRESENT (QNdrop_CURR) .AND. &
2051 PRESENT (QR_CURR) .AND. PRESENT (QNR_CURR) .AND. &
2052 PRESENT (QI_CURR) .AND. PRESENT (QNI_CURR) .AND. &
2053 PRESENT (QS_CURR) .AND. PRESENT (QNS_CURR) .AND. &
2054 PRESENT (QG_CURR) .AND. PRESENT (QNG_CURR) .AND. &
2055 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
2057 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
2058 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
2059 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
2061 PRESENT ( W ) .AND. &
2062 PRESENT (QVOLG_CURR) .AND. F_QVOLG ) THEN
2065 CALL nssl_2mom_driver( &
2066 ITIMESTEP=itimestep, &
2088 RAINNCV = RAINNCV, &
2090 SNOWNCV = SNOWNCV, &
2092 HAILNCV = HAILNCV, &
2093 GRPLNC = GRAUPELNC, &
2094 GRPLNCV = GRAUPELNCV, &
2097 #if ( WRF_CHEM == 1 )
2098 WETSCAV_ON = config_flags%wetscav_onoff == 1, &
2099 EVAPPROD=evapprod,RAINPROD=rainprod, &
2101 nssl_progn=nssl_progn, &
2102 diagflag = diagflag, &
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_2momg')
2124 CALL wrf_debug(100, 'microphysics_driver: calling nssl_2momccn')
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 (QH_CURR) .AND. PRESENT (QNH_CURR) .AND. &
2132 PRESENT (RAINNC ) .AND. PRESENT (RAINNCV) .AND. &
2134 PRESENT (SNOWNC ) .AND. PRESENT (SNOWNCV) .AND. &
2135 PRESENT (HAILNC ) .AND. PRESENT (HAILNCV) .AND. &
2136 PRESENT (GRAUPELNC).AND.PRESENT (GRAUPELNCV).AND. &
2138 PRESENT ( W ) .AND. &
2139 PRESENT (QVOLG_CURR) .AND. F_QVOLG .AND. &
2140 PRESENT (QVOLH_CURR) .AND. F_QVOLH .AND. &
2141 PRESENT( QNN_CURR ) ) THEN
2144 CALL nssl_2mom_driver( &
2145 ITIMESTEP=itimestep, &
2171 RAINNCV = RAINNCV, &
2173 SNOWNCV = SNOWNCV, &
2175 HAILNCV = HAILNCV, &
2176 GRPLNC = GRAUPELNC, &
2177 GRPLNCV = GRAUPELNCV, &
2180 #if ( WRF_CHEM == 1 )
2181 WETSCAV_ON = config_flags%wetscav_onoff == 1, &
2182 EVAPPROD=evapprod,RAINPROD=rainprod,&
2184 nssl_progn=nssl_progn, &
2185 diagflag = diagflag, &
2186 ke_diag = ke_diag, &
2188 qrcuten=qrcuten, & ! hm
2189 qscuten=qscuten, & ! hm
2190 qicuten=qicuten, & ! hm
2191 qccuten=qccuten, & ! hm
2192 re_cloud=re_cloud, &
2195 has_reqc=has_reqc, & ! ala G. Thompson
2196 has_reqi=has_reqi, & ! ala G. Thompson
2197 has_reqs=has_reqs, & ! ala G. Thompson
2198 IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde, &
2199 IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme, &
2200 ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2203 Call wrf_error_fatal( 'arguments not present for calling nssl_2momccn')
2206 CASE (GSFCGCESCHEME)
2207 CALL wrf_debug ( 100 , 'microphysics_driver: calling GSFCGCE' )
2208 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2209 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2210 PRESENT( QS_CURR ) .AND. &
2211 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2212 PRESENT( HAIL ) .AND. PRESENT ( ICE2 ) .AND. &
2213 PRESENT( Z ) .AND. PRESENT ( W ) ) THEN
2221 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2222 ,HT=ht, DZ8W=dz8w, GRAV=G &
2223 ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2224 ,ITIMESTEP=itimestep &
2225 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2226 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2227 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2228 ,RAINNC=rainnc, RAINNCV=rainncv &
2229 ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr &
2230 ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv &
2231 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2232 ,diagflag=diagflag & ! added for radar reflectivity
2233 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2236 ,IHAIL=hail, ICE2=ice2 &
2238 ! HAIL = 1, run gsfcgce with hail option
2239 ! 0, run gsfcgce with graupel option <---- default
2240 ! note: no effect if ice2 = 1
2241 ! ICE2 = 1, run gsfcgce with only snow, ice
2242 ! 2, run gsfcgce with only graupel, ice
2243 ! 0, run gsfcgce with snow, ice and hail/graupel <---- default
2246 CALL wrf_error_fatal ( 'arguments not present for calling GSFCGCE' )
2249 CASE (NUWRF4ICESCHEME)
2250 CALL wrf_debug ( 100 , 'microphysics_driver: calling NUWRF4ICE' )
2251 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2252 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2253 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2254 PRESENT( QH_CURR ) .AND. &
2255 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2256 PRESENT( HAIL ) .AND. PRESENT ( ICE2 ) .AND. &
2257 PRESENT( Z ) .AND. PRESENT ( W ) ) THEN
2258 CALL gsfcgce_4ice_nuwrf( &
2266 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2267 ,HT=ht, DZ8W=dz8w, GRAV=G, W=w &
2268 ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2269 ,ITIMESTEP=itimestep, XLAND=xland, DX=dx &
2270 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2271 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2272 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2273 ,RAINNC=rainnc, RAINNCV=rainncv &
2274 ,SNOWNC=snownc, SNOWNCV=snowncv ,SR=sr &
2275 ,GRAUPELNC=graupelnc ,GRAUPELNCV=graupelncv &
2276 ,HAILNC=hailnc, HAILNCV=hailncv &
2277 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2278 ,diagflag=diagflag & ! added for radar reflectivity
2279 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2282 ! ,IHAIL=hail, ICE4=ice2 & ! hardcoded in the 4ice scheme
2284 !NUWRF JJS 20110525 vvvvv
2285 ,PHYSC=physc, PHYSE=physe, PHYSD=physd &
2286 ,PHYSS=physs, PHYSM=physm, PHYSF=physf &
2287 ,ACPHYSC=acphysc, ACPHYSE=acphyse, ACPHYSD=acphysd &
2288 ,ACPHYSS=acphyss, ACPHYSM=acphysm, ACPHYSF=acphysf &
2289 ,RE_CLOUD_GSFC=re_cloud_gsfc &
2290 ,RE_RAIN_GSFC=re_rain_gsfc &
2291 ,RE_ICE_GSFC=re_ice_gsfc &
2292 ,RE_SNOW_GSFC=re_snow_gsfc &
2293 ,RE_GRAUPEL_GSFC=re_graupel_gsfc &
2294 ,RE_HAIL_GSFC=re_hail_gsfc &
2295 ,PRECR3D=precr3d,PRECI3D=preci3d,PRECS3D=precs3d &
2296 ,PRECG3D=precg3d,PRECH3D=prech3d &
2297 #if ( WRF_CHEM == 1)
2299 ,ICN_DIAG=icn_diag, NC_DIAG=nc_diag, GID=ID &
2300 ,CHEM_OPT=chem_opt &
2301 ,GSFCGCE_GOCART_COUPLING=gsfcgce_gocart_coupling &
2303 !NUWRF JJS 20110525 ^^^^^
2309 ! Snapshot total latent heating rate [K/s]
2310 phys_tot(i,k,j) = physc(i,k,j) + physe(i,k,j) + &
2311 physd(i,k,j) + physs(i,k,j) + physm(i,k,j) + &
2313 ! Accumulated total latent heating [K]
2314 acphys_tot(i,k,j) = acphysc(i,k,j) + acphyse(i,k,j) + &
2315 acphysd(i,k,j) + acphyss(i,k,j) + acphysm(i,k,j) + &
2323 CALL wrf_error_fatal ( 'arguments not present for calling NUWRF4ICESFCGCE' )
2327 CALL wrf_debug ( 100 , 'microphysics_driver: calling lin_et_al' )
2328 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2329 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2330 PRESENT( QS_CURR ) .AND. &
2331 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2341 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2342 ,HT=ht, DZ8W=dz8w, GRAV=G, CP=cp &
2343 ,RAIR=r_d, RVAPOR=R_v &
2344 ,XLS=xls, XLV=xlv, XLF=xlf &
2345 ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2346 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
2347 ,SVP3=svp3,SVPT0=svpt0 &
2348 ,RAINNC=rainnc, RAINNCV=rainncv &
2349 ,SNOWNC=snownc, SNOWNCV=snowncv &
2350 ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &
2351 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2352 ,diagflag=diagflag & ! added for radar reflectivity
2353 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2354 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2355 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2356 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2357 ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg &
2358 ,F_QG=f_qg, F_QNDROP=f_qndrop &
2360 ,QNDROP=qndrop_curr &
2363 CALL wrf_error_fatal ( 'arguments not present for calling lin_et_al' )
2366 CASE (SBU_YLINSCHEME)
2367 CALL wrf_debug ( 100 , 'microphysics_driver: calling sbu_ylin' )
2368 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2369 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2370 PRESENT( QS_CURR ) .AND. &
2371 PRESENT( RI_CURR ) .AND. &
2372 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2383 ,RHO=rho, PII=pi_phy, P=p, DT_IN=dt, Z=z &
2386 ! ,RAIR=r_d, RVAPOR=R_v &
2387 ! ,XLS=xls, XLV=xlv, XLF=xlf &
2388 ! ,RHOWATER=rhowater, RHOSNOW=rhosnow &
2389 ! ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
2390 ! ,SVP3=svp3,SVPT0=svpt0 &
2391 ,RAINNC=rainnc, RAINNCV=rainncv &
2392 ! ,SNOWNC=snownc, SNOWNCV=snowncv &
2393 ! ,GRAUPELNC=graupelnc, GRAUPELNCV=graupelncv, SR=sr &
2394 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2395 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2396 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2397 ! ,PRECR=precr,PRECI=preci,PRECS=precs,PRECG=precg &
2399 ! ,F_QNDROP=f_qndrop &
2401 ! ,QNDROP=qndrop_curr &
2404 CALL wrf_error_fatal ( 'arguments not present for calling sbu_ylin' )
2409 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm3' )
2410 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2411 PRESENT( QR_CURR ) .AND. &
2412 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2419 ,W=w,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2420 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2421 ,RD=r_d,RV=r_v,T0C=svpt0 &
2422 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2423 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2424 ,DEN0=rhoair0, DENR=rhowater &
2425 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2426 ,RAIN=rainnc ,RAINNCV=rainncv &
2427 ,SNOW=snownc ,SNOWNCV=snowncv &
2430 ,has_reqc=has_reqc & ! for radiation +
2431 ,has_reqi=has_reqi &
2432 ,has_reqs=has_reqs &
2433 ,re_cloud=re_cloud &
2435 ,re_snow=re_snow & ! for radiation -
2437 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2438 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2439 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2442 CALL wrf_error_fatal ( 'arguments not present for calling wsm3' )
2445 #ifndef XEON_OPTIMIZED_WSM5
2447 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm5' )
2448 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2449 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2450 PRESENT( QS_CURR ) .AND. &
2451 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2459 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2460 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2461 ,RD=r_d,RV=r_v,T0C=svpt0 &
2462 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2463 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2464 ,DEN0=rhoair0, DENR=rhowater &
2465 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2466 ,RAIN=rainnc ,RAINNCV=rainncv &
2467 ,SNOW=snownc ,SNOWNCV=snowncv &
2470 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2471 ,diagflag=diagflag & ! added for radar reflectivity
2472 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2473 ,has_reqc=has_reqc & ! for radiation +
2474 ,has_reqi=has_reqi &
2475 ,has_reqs=has_reqs &
2476 ,re_cloud=re_cloud &
2478 ,re_snow=re_snow & ! for radiation -
2480 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2481 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2482 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2485 CALL wrf_error_fatal ( 'arguments not present for calling wsm5' )
2490 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm6' )
2491 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2492 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2493 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2494 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2503 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2504 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2505 ,RD=r_d,RV=r_v,T0C=svpt0 &
2506 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2507 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2508 ,DEN0=rhoair0, DENR=rhowater &
2509 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2510 ,RAIN=rainnc ,RAINNCV=rainncv &
2511 ,SNOW=snownc ,SNOWNCV=snowncv &
2513 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2514 ,diagflag=diagflag & ! added for radar reflectivity
2515 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2516 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2517 ,has_reqc=has_reqc & ! for radiation +
2518 ,has_reqi=has_reqi &
2519 ,has_reqs=has_reqs &
2520 ,re_cloud=re_cloud &
2522 ,re_snow=re_snow & ! for radiation -
2523 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2524 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2525 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2526 #if ( WRF_CHEM == 1 )
2527 ,WETSCAV_ON=config_flags%wetscav_onoff==1 &
2528 ,EVAPPROD=evapprod,RAINPROD=rainprod &
2532 CALL wrf_error_fatal ( 'arguments not present for calling wsm6' )
2536 CALL wrf_debug ( 100 , 'microphysics_driver: calling wsm7' )
2537 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2538 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2539 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2540 PRESENT( QH_CURR ) .AND. &
2541 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2551 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2552 ,DELT=dt,G=g,CPD=cp,CPV=cpv &
2553 ,RD=r_d,RV=r_v,T0C=svpt0 &
2554 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2555 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2556 ,DEN0=rhoair0, DENR=rhowater &
2557 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2558 ,RAIN=rainnc ,RAINNCV=rainncv &
2559 ,SNOW=snownc ,SNOWNCV=snowncv &
2561 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2562 ,diagflag=diagflag & ! added for radar reflectivity
2563 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2564 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2565 ,HAIL=hailnc ,HAILNCV=hailncv &
2566 ,has_reqc=has_reqc & ! for radiation +
2567 ,has_reqi=has_reqi &
2568 ,has_reqs=has_reqs &
2569 ,re_cloud=re_cloud &
2571 ,re_snow=re_snow & ! for radiation -
2572 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2573 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2574 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2577 CALL wrf_error_fatal ( 'arguments not present for calling wsm7' )
2581 CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm5' )
2582 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2583 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2584 PRESENT( QS_CURR ) .AND. PRESENT( QNN_CURR ) .AND. &
2585 PRESENT ( QNC_CURR ) .AND. PRESENT( QNR_CURR ).AND. &
2586 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2597 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2598 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc & ! RAS
2599 ,RD=r_d,RV=r_v,T0C=svpt0 &
2600 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2601 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2602 ,DEN0=rhoair0, DENR=rhowater &
2603 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2604 ,RAIN=rainnc ,RAINNCV=rainncv &
2605 ,SNOW=snownc ,SNOWNCV=snowncv &
2607 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2608 ,diagflag=diagflag & ! added for radar reflectivity
2609 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2610 ,has_reqc=has_reqc & ! for radiation +
2611 ,has_reqi=has_reqi &
2612 ,has_reqs=has_reqs &
2613 ,re_cloud=re_cloud &
2615 ,re_snow=re_snow & ! for radiation -
2616 ,ITIMESTEP=itimestep &
2617 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2618 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2619 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2622 CALL wrf_error_fatal ( 'arguments not present for calling wdm5')
2626 CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm6' )
2627 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2628 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2629 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2630 PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. &
2631 PRESENT( QNR_CURR ).AND. &
2632 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) ) THEN
2644 ,DEN=rho,PII=pi_phy,P=p,DELZ=dz8w &
2645 ,DELT=dt,G=g,CPD=cp,CPV=cpv,CCN0=ccn_conc & ! RAS
2646 ,RD=r_d,RV=r_v,T0C=svpt0 &
2647 ,EP1=ep_1, EP2=ep_2, QMIN=epsilon &
2648 ,XLS=xls, XLV0=xlv, XLF0=xlf &
2649 ,DEN0=rhoair0, DENR=rhowater &
2650 ,CLIQ=cliq,CICE=cice,PSAT=psat &
2651 ,xland=xland & ! land mask, 1: land, 2: water
2652 ,RAIN=rainnc ,RAINNCV=rainncv &
2653 ,SNOW=snownc ,SNOWNCV=snowncv &
2655 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2656 ,diagflag=diagflag & ! added for radar reflectivity
2657 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2658 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2659 ,ITIMESTEP=itimestep &
2660 ,has_reqc=has_reqc & ! for radiation +
2661 ,has_reqi=has_reqi &
2662 ,has_reqs=has_reqs &
2663 ,re_cloud=re_cloud &
2665 ,re_snow=re_snow & ! for radiation -
2666 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2667 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2668 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2671 CALL wrf_error_fatal ( 'arguments not present for calling wdm6')
2675 CALL wrf_debug ( 100 , 'microphysics_driver: calling wdm7' )
2676 IF ( PRESENT( QV_CURR ) .AND. PRESENT ( QC_CURR ) .AND. &
2677 PRESENT( QR_CURR ) .AND. PRESENT ( QI_CURR ) .AND. &
2678 PRESENT( QS_CURR ) .AND. PRESENT ( QG_CURR ) .AND. &
2679 PRESENT( QH_CURR ) .AND. &
2680 PRESENT( QNN_CURR ) .AND. PRESENT ( QNC_CURR ) .AND. &
2681 PRESENT( QNR_CURR ).AND. &
2682 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 ,xland=xland & ! land mask, 1: land, 2: water
2703 ,RAIN=rainnc ,RAINNCV=rainncv &
2704 ,SNOW=snownc ,SNOWNCV=snowncv &
2706 ,REFL_10CM=refl_10cm & ! added for radar reflectivity
2707 ,diagflag=diagflag & ! added for radar reflectivity
2708 ,do_radar_ref=do_radar_ref & ! added for radar reflectivity
2709 ,GRAUPEL=graupelnc ,GRAUPELNCV=graupelncv &
2710 ,HAIL=hailnc ,HAILNCV=hailncv &
2711 ,ITIMESTEP=itimestep &
2712 ,has_reqc=has_reqc & ! for radiation +
2713 ,has_reqi=has_reqi &
2714 ,has_reqs=has_reqs &
2715 ,re_cloud=re_cloud &
2717 ,re_snow=re_snow & ! for radiation -
2718 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2719 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2720 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2723 CALL wrf_error_fatal ( 'arguments not present for calling wdm7')
2726 CASE (ETAMPNEW) !-- Operational 4-km High-Resolution Window (HRW) version
2727 CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')
2729 IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &
2730 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2731 PRESENT( mp_restart_state ) .AND. &
2732 PRESENT( tbpvs_state ) .AND. &
2733 PRESENT( tbpvs0_state ) ) THEN
2735 ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy &
2736 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
2742 ,LOWLYR=LOWLYR,SR=SR &
2743 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY &
2744 ,F_RIMEF_PHY=F_RIMEF_PHY &
2745 ,RAINNC=rainnc,RAINNCV=rainncv &
2746 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2747 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2748 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2749 ,MP_RESTART_STATE=mp_restart_state &
2750 ,TBPVS_STATE=tbpvs_state,TBPVS0_STATE=tbpvs0_state &
2753 CALL wrf_error_fatal ( 'arguments not present for calling etampnew' )
2755 CASE (FER_MP_HIRES) !-- Operational Ferrier-Aligo High-Resolution Window(HRW) version
2756 ! (2014/2 version) added by Weiguo Wang on
2758 CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')
2760 IF ( PRESENT( qv_curr ) .AND. PRESENT( qt_curr ) .AND. &
2761 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2762 PRESENT( mp_restart_state ) .AND. &
2763 PRESENT( tbpvs_state ) .AND. &
2764 PRESENT( tbpvs0_state ) ) THEN
2766 ! 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
2767 ! write(0,*)'max qi=',maxval(qi_curr(its:ite,kts:kte,jts:jte))
2768 ! write(0,*)'max qs=',maxval(qs_curr(its:ite,kts:kte,jts:jte))
2771 ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id &
2772 ,RAINNC=rainnc,RAINNCV=rainncv &
2773 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
2776 ,LOWLYR=LOWLYR,SR=SR &
2777 ,F_ICE_PHY=F_ICE_PHY,F_RAIN_PHY=F_RAIN_PHY &
2778 ,F_RIMEF_PHY=F_RIMEF_PHY &
2779 ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr &
2780 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2781 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2782 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2785 CALL wrf_error_fatal ( 'arguments not present for calling fer_hires' )
2788 CASE (FER_MP_HIRES_ADVECT) !-- Operational Ferrier-Aligo High-Resolution Window(HRW) version
2789 ! (2014/2 version) added by Weiguo Wang on
2791 ! Modified for advection, Sam Trahan, August 2015
2792 CALL wrf_debug ( 100 , 'microphysics_driver: calling etampnew')
2794 IF ( PRESENT( qv_curr ) .AND. PRESENT( qi_curr ) .AND. &
2795 PRESENT( qc_curr ) .and. PRESENT(qrimef_curr) .AND. &
2796 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV ) .AND. &
2797 PRESENT( mp_restart_state ) .AND. &
2798 PRESENT( tbpvs_state ) .AND. &
2799 PRESENT( tbpvs0_state ) ) THEN
2801 ! 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
2802 ! write(0,*)'max qi=',maxval(qi_curr(its:ite,kts:kte,jts:jte))
2803 ! write(0,*)'max qs=',maxval(qs_curr(its:ite,kts:kte,jts:jte))
2805 CALL FER_HIRES_ADVECT( &
2806 ITIMESTEP=itimestep,DT=dt,DX=dx,DY=dy, GID=id &
2807 ,RAINNC=rainnc,RAINNCV=rainncv &
2808 ,DZ8W=dz8w,RHO_PHY=rho,P_PHY=p,PI_PHY=pi_phy,TH_PHY=th &
2810 ,LOWLYR=LOWLYR,SR=SR &
2811 ,QC=qc_curr,QR=Qr_curr,QI=Qi_curr,QRIMEF=qrimef_curr &
2812 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2813 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2814 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2817 CALL wrf_error_fatal ( 'arguments not present for calling fer_hires' )
2821 CASE (CAMMGMPSCHEME)
2822 CALL wrf_debug ( 100 , 'microphysics_driver: calling CAMMGMPSCHEME')
2823 IF ( PRESENT( z ) .AND. PRESENT( ht ) .AND. &
2824 PRESENT( qs_curr ) .AND. &
2825 PRESENT( qv_curr ) .AND. PRESENT( qc_curr ) .AND. &
2826 PRESENT( qi_curr ) .AND. PRESENT( f_qc ) .AND. &
2827 PRESENT( qr_curr ) .AND. PRESENT( qndrop_curr ) .AND. &
2828 PRESENT( f_qi ) .AND. PRESENT( qnc_curr ) .AND. &
2829 PRESENT( RAINNCV ) .AND. PRESENT( SNOWNCV ) .AND. &
2830 PRESENT( qns_curr ) .AND. PRESENT( qnr_curr ) .AND. &
2831 #if ( WRF_CHEM == 1 )
2832 PRESENT( chem ) .AND. PRESENT(dgnum4D ) .AND. &
2833 PRESENT( dgnumwet4D ) .AND. &
2835 PRESENT( qni_curr ) .AND. PRESENT( RAINNC ) ) THEN
2836 #if ( WRF_CHEM == 1 )
2837 qv_b4mp(its:ite,kts:kte,jts:jte) = qv_curr(its:ite,kts:kte,jts:jte)
2838 qc_b4mp(its:ite,kts:kte,jts:jte) = qc_curr(its:ite,kts:kte,jts:jte)
2839 qi_b4mp(its:ite,kts:kte,jts:jte) = qi_curr(its:ite,kts:kte,jts:jte)
2840 qs_b4mp(its:ite,kts:kte,jts:jte) = qs_curr(its:ite,kts:kte,jts:jte)
2843 CALL CAMMGMP(ITIMESTEP=itimestep,DT=dt,P8W=p8w_hyd,P_HYD=p_hyd &
2844 ,T_PHY=t_phy,PI_PHY=pi_phy,Z_AT_W=z_at_w,QFX=qfx &
2845 ,TKE_PBL=tke_pbl,TURBTYPE3D=turbtype3d,SMAW3D=smaw3d &
2846 ,DLF3D=dlf,DLF2_3D=dlf2,RLIQ2D=rliq,Z_SEA_LEVEL=z &
2847 ,KVH3D=exch_h,HT=ht,ALT=alt,ACCUM_MODE=accum_mode &
2848 ,AITKEN_MODE=aitken_mode,COARSE_MODE=coarse_mode &
2849 ,ICWMRSH3D=icwmrsh3d,ICWMRDP3D=icwmrdp3d,SHFRC3D=shfrc3d &
2850 ,CMFMC3D=cmfmc3d,CMFMC2_3D=cmfmc2_3d &
2851 ,CONFIG_FLAGS=config_flags,F_ICE_PHY=f_ice_phy &
2852 ,F_RAIN_PHY=f_rain_phy &
2853 #if ( WRF_CHEM == 1 )
2854 ,DGNUM4D=dgnum4D,DGNUMWET4D=dgnumwet4D &
2856 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2857 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2858 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2859 !Output variables from CAMMGMP
2860 ,TH=th,CLDFRA_OLD_MP=cldfra_old_mp,CLDFRA_MP=cldfra_mp &
2861 ,CLDFRA_MP_ALL=cldfra_mp_all,lradius=lradius,iradius=iradius &
2862 ,CLDFRAI=cldfrai,CLDFRAL=cldfral &
2863 ,CLDFRA_CONV=cldfra_conv,WSEDL3D=wsedl3d &
2864 ,RAINNC=rainnc,RAINNCV=rainncv,SNOWNC=snownc,SNOWNCV=snowncv &
2865 ,SR=sr,QV_CURR=qv_curr,QC_CURR=qc_curr,QI_CURR=qi_curr &
2866 ,QS_CURR=qs_curr,QR_CURR=qr_curr,NC3D=qnc_curr &
2867 ,NI3D=qni_curr,NS3D=qns_curr,NR3D=qnr_curr,QNDROP=qndrop_curr&
2868 ,RH_OLD_MP=rh_old_mp,LCD_OLD_MP=lcd_old_mp &
2869 #if ( WRF_CHEM == 1 )
2871 ,QME3D=qme3d,PRAIN3D=prain3d,NEVAPR3D=nevapr3d &
2872 ,RATE1ORD_CW2PR_ST3D=rate1ord_cw2pr_st3d &
2874 ,XLAND=XLAND,SNOWH=SNOWH &
2877 CALL wrf_error_fatal ( 'arguments not present for calling CAMMGMP SCHEME' )
2880 ! Added by Zhuxiao, lscond (simplified Large-scale condensation scheme by Jimy )
2881 #if ( WRFPLUS == 1 )
2883 CALL wrf_debug ( 100 , 'microphysics_driver: calling lscond' )
2884 IF ( PRESENT( QV_CURR ) .AND. &
2885 PRESENT( RAINNC ) .AND. PRESENT ( RAINNCV )) THEN
2891 ,RHO=rho, PII=pi_phy, XLV=xlv, CP=cp &
2892 ,EP2=ep_2,SVP1=svp1,SVP2=svp2 &
2893 ,SVP3=svp3,SVPT0=svpt0 &
2896 ,RAINNC=rainnc,RAINNCV=rainncv &
2897 ,IDS=ids,IDE=ide, JDS=jds,JDE=jde, KDS=kds,KDE=kde &
2898 ,IMS=ims,IME=ime, JMS=jms,JME=jme, KMS=kms,KME=kme &
2899 ,ITS=its,ITE=ite, JTS=jts,JTE=jte, KTS=kts,KTE=kte &
2902 CALL wrf_error_fatal ( 'arguments not present for calling lscond' )
2908 CALL wrf_debug ( 100 , 'microphysics_driver: case MADWRF_MP')
2912 WRITE( wrf_err_message , * ) 'The microphysics option does not exist: mp_physics = ', mp_physics
2913 CALL wrf_error_fatal ( wrf_err_message )
2915 END SELECT micro_select
2918 !$OMP END PARALLEL DO
2920 #ifdef XEON_OPTIMIZED_WSM5
2925 ! IF ( PRESENT (LWP) ) THEN
2926 ! DO ij = 1 , num_tiles
2935 ! lwp(i,j)=lwp(i,j)+qc_curr(i,k,j)*rho(i,k,j)*dz8w(i,k,j)
2943 CALL wrf_debug ( 200 , 'microphysics_driver: returning from' )
2947 END SUBROUTINE microphysics_driver
2949 subroutine Add_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
2950 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
2951 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
2952 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
2956 integer, intent(in) :: its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte
2957 real, intent(in) :: pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, pert_thom_ni
2958 real, dimension(ims:ime, kms:kme, jms:jme), optional, intent (in) :: perts_qvapor, perts_qcloud, perts_qice, &
2959 perts_qsnow, perts_ni
2960 real, dimension(ims:ime, kms:kme, jms:jme), intent (inout) :: qv_curr, qc_curr, qi_curr, qs_curr, qni_curr
2961 real, dimension (its:ite, kts:kte, jts:jte), intent (out) :: qv_tmp, qc_tmp, qi_tmp, qs_tmp, qni_tmp
2969 qv_tmp(i, k, j) = qv_curr(i, k, j)
2970 qv_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qvapor(i, k, j) * pert_thom_qv) * qv_curr(i, k, j))
2971 qc_tmp(i, k, j) = qc_curr(i, k, j)
2972 qc_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qcloud(i, k, j) * pert_thom_qc) * qc_curr(i, k, j))
2973 qi_tmp(i, k, j) = qi_curr(i, k, j)
2974 qi_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qice(i, k, j) * pert_thom_qi) * qi_curr(i, k, j))
2975 qs_tmp(i, k, j) = qs_curr(i, k, j)
2976 qs_curr(i, k, j) = max (QX_MIN, (1.0 + perts_qsnow(i, k, j) * pert_thom_qs) * qs_curr(i, k, j))
2977 qni_tmp(i, k, j) = qni_curr(i, k, j)
2978 qni_curr(i, k, j) = max (NI_MIN, (1.0 + perts_ni(i, k, j) * pert_thom_ni) * qni_curr(i, k, j))
2983 end subroutine Add_multi_perturb_mp_perturbations
2985 subroutine Remove_multi_perturb_mp_perturbations (perts_qvapor, perts_qcloud, perts_qice, &
2986 perts_qsnow, perts_ni, pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, &
2987 pert_thom_ni, qv_curr, qc_curr, qi_curr, qs_curr, qni_curr, qv_tmp, qc_tmp, qi_tmp, &
2988 qs_tmp, qni_tmp, its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte)
2992 integer, intent(in) :: its, ite, jts, jte, ims, ime, jms, jme, kms, kme, kts, kte
2993 real, intent(in) :: pert_thom_qv, pert_thom_qc, pert_thom_qi, pert_thom_qs, pert_thom_ni
2994 real, dimension(ims:ime, kms:kme, jms:jme), optional, intent (in) :: perts_qvapor, perts_qcloud, perts_qice, &
2995 perts_qsnow, perts_ni
2996 real, dimension(ims:ime, kms:kme, jms:jme), intent (inout) :: qv_curr, qc_curr, qi_curr, qs_curr, qni_curr
2997 real, dimension (its:ite, kts:kte, jts:jte), intent (in) :: qv_tmp, qc_tmp, qi_tmp, qs_tmp, qni_tmp
3005 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))
3006 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))
3007 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))
3008 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))
3009 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))
3014 end subroutine Remove_multi_perturb_mp_perturbations
3016 END MODULE module_microphysics_driver