← Back to Documentation Home
CCPP SciDoc v8.0.0  v8.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
Aerosol-Aware Thompson MP Module

Modules

module  module_mp_radar
 This module is more library code whereas the individual microphysics schemes contains specific details needed for the final computation, so refer to location within each schemes calling the routine named rayleigh_soak_wetgraupel.
 
module  module_mp_thompson
 This module computes the moisture tendencies of water vapor, cloud droplets, rain, cloud ice (pristine), snow, and graupel. Prior to WRFv2.2 this code was based on Reisner et al (1998), but few of those pieces remain. A complete description is now found in Thompson, G., P. R. Field, R. M. Rasmussen, and W. D. Hall, 2008: Explicit Forecasts of winter precipitation using an improved bulk microphysics scheme. Part II: Implementation of a new snow parameterization. Mon. Wea. Rev., 136, 5095-5115.
 
module  module_mp_thompson_make_number_concentrations
 This module ocntains lookup tables of radiative effective radius of cloud ice, rain and water.
 

Functions/Subroutines

subroutine module_mp_tempo::tempo_final ()
 
elemental real function module_mp_tempo_utils_v2::make_icenumber (q_ice, temp)
 Table of lookup values of radiative effective radius of ice crystals as a function of Temperature from -94C to 0C. Taken from WRF RRTMG radiation code where it is attributed to Jon Egill Kristjansson and coauthors.
 
subroutine module_mp_thompson::thompson_final ()
 
subroutine module_mp_thompson::qr_acr_qg
 Rain collecting graupel (and inverse). Explicit CE integration.
 
subroutine module_mp_thompson::qr_acr_qs
 Rain collecting snow (and inverse). Explicit CE integration.
 
subroutine module_mp_thompson::freezeh2o (threads)
 This is a literal adaptation of Bigg (1954) probability of drops of a particular volume freezing. Given this probability, simply freeze the proportion of drops summing their masses.
 
subroutine module_mp_thompson::qi_aut_qs
 Cloud ice converting to snow since portion greater than min snow size. Given cloud ice content (kg/m**3), number concentration (#/m**3) and gamma shape parameter, mu_i, break the distrib into bins and figure out the mass/number of ice with sizes larger than D0s. Also, compute incomplete gamma function for the integration of ice depositional growth from diameter=0 to D0s. Amount of ice depositional growth is this portion of distrib while larger diameters contribute to snow growth (as in Harrington et al. 1995).
 
subroutine module_mp_thompson::table_efrw
 Variable collision efficiency for rain collecting cloud water using method of Beard and Grover, 1974 if a/A less than 0.25; otherwise uses polynomials to get close match of Pruppacher & Klett Fig 14-9.
 
subroutine module_mp_thompson::table_efsw
 Variable collision efficiency for snow collecting cloud water using method of Wang and Ji, 2000 except equate melted snow diameter to their "effective collision cross-section.".
 
real function module_mp_thompson::eff_aero (d, da, visc, rhoa, temp, species)
 Function to compute collision efficiency of collector species (rain, snow, graupel) of aerosols. Follows Wang et al, 2010, ACP, which follows Slinn (1983).
 
subroutine module_mp_thompson::table_dropevap
 Integrate rain size distribution from zero to D-star to compute the number of drops smaller than D-star that evaporate in a single timestep. Drops larger than D-star dont evaporate entirely so do not affect number concentration.
 
subroutine module_mp_thompson::table_ccnact (errmess, errflag)
 Fill the table of CCN activation data created from parcel model run by Trude Eidhammer with inputs of aerosol number concentration, vertical velocity, temperature, lognormal mean aerosol radius, and hygroscopicity, kappa. The data are read from external file and contain activated fraction of CCN for given conditions.
 
real function module_mp_thompson::activ_ncloud (tt, ww, nccn, lsm_in)
 Retrieve fraction of CCN that gets activated given the model temp, vertical velocity, and available CCN concentration. The lookup table (read from external file) has CCN concentration varying the quickest, then updraft, then temperature, then mean aerosol radius, and finally hygroscopicity, kappa.
 
subroutine module_mp_thompson::gcf (gammcf, a, x, gln)
 Returns the incomplete gamma function q(a,x) evaluated by its continued fraction representation as gammcf.
 
subroutine module_mp_thompson::gser (gamser, a, x, gln)
 Returns the incomplete gamma function p(a,x) evaluated by its series representation as gamser.
 
real function module_mp_thompson::gammln (xx)
 Returns the value ln(gamma(xx)) for xx > 0.
 
real function module_mp_thompson::gammp (a, x)
 
real function module_mp_thompson::wgamma (y)
 
real function module_mp_thompson::rslf (p, t)
 THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESSURE.
 
real function module_mp_thompson::rsif (p, t)
 THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESSURE.
 
real function module_mp_thompson::icedemott (tempc, qv, qvs, qvsi, rho, nifa)
 
real function module_mp_thompson::icekoop (temp, qv, qvs, naero, dt)
 Newer research since Koop et al (2001) suggests that the freezing rate should be lower than original paper, so J_rate is reduced by two orders of magnitude.
 
real function module_mp_thompson::delta_p (yy, y1, y2, aa, bb)
 Helper routine for Phillips et al (2008) ice nucleation.
 
subroutine module_mp_thompson::calc_effectrad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, re_qc1d, re_qi1d, re_qs1d, lsml, kts, kte)
 Compute radiation effective radii of cloud water, ice, and snow. These are entirely consistent with microphysics assumptions, not constant or otherwise ad hoc as is internal to most radiation schemes. Since only the smallest snowflakes should impact radiation, compute from first portion of complicated Field number distribution, not the second part, which is the larger sizes.
 
subroutine module_mp_thompson::calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, t1d, p1d, dbz, rand1, kts, kte, ii, jj, melti, vt_dbz, first_time_step)
 Compute radar reflectivity assuming 10 cm wavelength radar and using Rayleigh approximation. Only complication is melted snow/graupel which we treat as water-coated ice spheres and use Uli Blahak's library of routines. The meltwater fraction is simply the amount of frozen species remaining from what initially existed at the melting level interface.
 
subroutine module_mp_thompson::graupel_psd_parameters (kts, kte, rand1, rg, ilamg, n0_g)
 Calculates graupel size distribution parameters.
 
real(wp) function module_mp_thompson::hail_mass_99th_percentile (kts, kte, qg, temperature, pressure, qv)
 Calculates graupel/hail maximum diameter.
 
elemental real function, public module_mp_thompson_make_number_concentrations::make_icenumber (q_ice, temp)
 Table of lookup values of radiative effective radius of ice crystals as a function of Temperature from -94C to 0C. Taken from WRF RRTMG radiation code where it is attributed to Jon Egill Kristjansson and coauthors.
 
elemental real function, public module_mp_thompson_make_number_concentrations::make_dropletnumber (q_cloud, qnwfa)
 
elemental real function, public module_mp_thompson_make_number_concentrations::make_rainnumber (q_rain, temp)
 
subroutine module_mp_thompson::thompson_init (is_aerosol_aware_in, merra2_aerosol_aware_in, mpicomm, mpirank, mpiroot, threads, errmsg, errflg)
 This subroutine calculates simplified cloud species equations and create lookup tables in Thomspson scheme.
 
subroutine module_mp_thompson::mp_gt_driver (wrf_chem)
 This is a wrapper routine designed to transfer values from 3D to 1D.
 
subroutine module_mp_thompson::mp_thompson (wrf_chem)
 This subroutine computes the moisture tendencies of water vapor, cloud droplets, rain, cloud ice (pristine), snow, and graupel. Previously this code was based on Reisner et al (1998), but few of those pieces remain. A complete description is now found in Thompson et al. (2004, 2008)[191] [192].
 
subroutine, public mp_thompson::mp_thompson_run (ncol, nlev, con_g, con_rd, con_eps, convert_dry_rho, spechum, qc, qr, qi, qs, qg, ni, nr, is_aerosol_aware, merra2_aerosol_aware, nc, nwfa, nifa, nwfa2d, nifa2d, aero_ind_fdb, tgrs, prsl, phii, omega, sedi_semi, decfl, islmsk, dtp, dt_inner, first_time_step, istep, nsteps, prcp, rain, graupel, ice, snow, sr, refl_10cm, fullradar_diag, max_hail_diam_sfc, do_radar_ref, aerfld, mpicomm, mpirank, mpiroot, ext_diag, diag3d, reset_diag3d, spp_wts_mp, spp_mp, n_var_spp, spp_prt_list, spp_var_list, spp_stddev_cutoff, cplchm, pfi_lsan, pfl_lsan, is_initialized, fs_fac_rain, fs_fac_snow, ten_q, dspechum, dqc, dqr, dqi, dqs, dqg, dni, dnr, dnc, dnwfa, dnifa, dtgrs, ten_u, ten_v, errmsg, errflg)
 

Detailed Description

Function/Subroutine Documentation

◆ activ_ncloud()

real function module_mp_thompson::activ_ncloud ( real(wp), intent(in)  tt,
real(wp), intent(in)  ww,
real(wp), intent(in)  nccn,
integer, intent(in)  lsm_in 
)

Retrieve fraction of CCN that gets activated given the model temp, vertical velocity, and available CCN concentration. The lookup table (read from external file) has CCN concentration varying the quickest, then updraft, then temperature, then mean aerosol radius, and finally hygroscopicity, kappa.

Definition at line 5355 of file module_mp_thompson.F90.

References module_mp_thompson::activ_ncloud().

Referenced by module_mp_thompson::activ_ncloud(), and module_mp_thompson::mp_thompson().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_effectrad()

subroutine module_mp_thompson::calc_effectrad ( real(wp), dimension(kts:kte), intent(in)  t1d,
real(wp), dimension(kts:kte), intent(in)  p1d,
real(wp), dimension(kts:kte), intent(in)  qv1d,
real(wp), dimension(kts:kte), intent(in)  qc1d,
real(wp), dimension(kts:kte), intent(in)  nc1d,
real(wp), dimension(kts:kte), intent(in)  qi1d,
real(wp), dimension(kts:kte), intent(in)  ni1d,
real(wp), dimension(kts:kte), intent(in)  qs1d,
real(wp), dimension(kts:kte), intent(out)  re_qc1d,
real(wp), dimension(kts:kte), intent(out)  re_qi1d,
real(wp), dimension(kts:kte), intent(out)  re_qs1d,
integer  lsml,
integer, intent(in)  kts,
integer, intent(in)  kte 
)

Compute radiation effective radii of cloud water, ice, and snow. These are entirely consistent with microphysics assumptions, not constant or otherwise ad hoc as is internal to most radiation schemes. Since only the smallest snowflakes should impact radiation, compute from first portion of complicated Field number distribution, not the second part, which is the larger sizes.

Definition at line 5790 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::mp_gt_driver().

Here is the caller graph for this function:

◆ calc_refl10cm()

subroutine module_mp_thompson::calc_refl10cm ( real(wp), dimension(kts:kte), intent(in)  qv1d,
real(wp), dimension(kts:kte), intent(in)  qc1d,
real(wp), dimension(kts:kte), intent(in)  qr1d,
real(wp), dimension(kts:kte), intent(in)  nr1d,
real(wp), dimension(kts:kte), intent(in)  qs1d,
real(wp), dimension(kts:kte), intent(in)  qg1d,
real(wp), dimension(kts:kte), intent(in)  t1d,
real(wp), dimension(kts:kte), intent(in)  p1d,
real(wp), dimension(kts:kte), intent(inout)  dbz,
real(wp), intent(in)  rand1,
integer, intent(in)  kts,
integer, intent(in)  kte,
integer, intent(in)  ii,
integer, intent(in)  jj,
logical, intent(in)  melti,
real(wp), dimension(kts:kte), intent(inout), optional  vt_dbz,
logical, intent(in), optional  first_time_step 
)

Compute radar reflectivity assuming 10 cm wavelength radar and using Rayleigh approximation. Only complication is melted snow/graupel which we treat as water-coated ice spheres and use Uli Blahak's library of routines. The meltwater fraction is simply the amount of frozen species remaining from what initially existed at the melting level interface.

Definition at line 5913 of file module_mp_thompson.F90.

References module_mp_thompson::graupel_psd_parameters().

Referenced by module_mp_thompson::mp_gt_driver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delta_p()

real function module_mp_thompson::delta_p ( real(wp), intent(in)  yy,
real(wp), intent(in)  y1,
real(wp), intent(in)  y2,
real(wp), intent(in)  aa,
real(wp), intent(in)  bb 
)

Helper routine for Phillips et al (2008) ice nucleation.

Definition at line 5747 of file module_mp_thompson.F90.

References module_mp_thompson::delta_p().

Referenced by module_mp_thompson::delta_p().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eff_aero()

real function module_mp_thompson::eff_aero ( real  d,
real  da,
real  visc,
real  rhoa,
real  temp,
character(len=1)  species 
)

Function to compute collision efficiency of collector species (rain, snow, graupel) of aerosols. Follows Wang et al, 2010, ACP, which follows Slinn (1983).

Definition at line 5156 of file module_mp_thompson.F90.

References module_mp_thompson::eff_aero().

Referenced by module_mp_thompson::eff_aero(), and module_mp_thompson::mp_thompson().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freezeh2o()

subroutine module_mp_thompson::freezeh2o ( integer, intent(in)  threads)

This is a literal adaptation of Bigg (1954) probability of drops of a particular volume freezing. Given this probability, simply freeze the proportion of drops summing their masses.

Definition at line 4823 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ gammln()

real function module_mp_thompson::gammln ( real(wp), intent(in)  xx)

Returns the value ln(gamma(xx)) for xx > 0.

Definition at line 5518 of file module_mp_thompson.F90.

References module_mp_thompson::gammln(), module_mp_thompson::gcf(), and module_mp_thompson::gser().

Referenced by module_mp_thompson::gammln(), module_mp_thompson::gcf(), and module_mp_thompson::gser().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gammp()

real function module_mp_thompson::gammp ( real(wp), intent(in)  a,
real(wp), intent(in)  x 
)

Definition at line 5544 of file module_mp_thompson.F90.

◆ gcf()

subroutine module_mp_thompson::gcf ( real(wp)  gammcf,
real(wp), intent(in)  a,
real(wp), intent(in)  x,
real(wp)  gln 
)

Returns the incomplete gamma function q(a,x) evaluated by its continued fraction representation as gammcf.

Definition at line 5445 of file module_mp_thompson.F90.

References module_mp_thompson::gammln().

Referenced by module_mp_thompson::gammln().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ graupel_psd_parameters()

subroutine module_mp_thompson::graupel_psd_parameters ( integer, intent(in)  kts,
integer, intent(in)  kte,
real(wp), intent(in)  rand1,
real(wp), dimension(:), intent(in)  rg,
real(dp), dimension(:), intent(out)  ilamg,
real(dp), dimension(:), intent(out)  n0_g 
)

Calculates graupel size distribution parameters.

Calculates graupel intercept and slope parameters for for a vertical column

Parameters
[in]ktsinteger start index for vertical column
[in]kteinteger end index for vertical column
[in]rand1real random number for stochastic physics
[in]rgreal array, size(kts:kte) for graupel mass concentration [kg m^3]
[out]ilamgdouble array, size(kts:kte) for inverse graupel slope parameter [m]
[out]N0_gdouble array, size(kts:kte) for graupel intercept paramter [m-4]

Definition at line 6471 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::calc_refl10cm(), module_mp_thompson::hail_mass_99th_percentile(), and module_mp_thompson::mp_thompson().

Here is the caller graph for this function:

◆ gser()

subroutine module_mp_thompson::gser ( real(wp)  gamser,
real(wp), intent(in)  a,
real(wp), intent(in)  x,
real(wp)  gln 
)

Returns the incomplete gamma function p(a,x) evaluated by its series representation as gamser.

Definition at line 5484 of file module_mp_thompson.F90.

References module_mp_thompson::gammln().

Referenced by module_mp_thompson::gammln().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hail_mass_99th_percentile()

real(wp) function module_mp_thompson::hail_mass_99th_percentile ( integer, intent(in)  kts,
integer, intent(in)  kte,
real(wp), dimension(:), intent(in)  qg,
real(wp), dimension(:), intent(in)  temperature,
real(wp), dimension(:), intent(in)  pressure,
real(wp), dimension(:), intent(in)  qv 
)

Calculates graupel/hail maximum diameter.

Calculates graupel/hail maximum diameter (currently the 99th percentile of mass distribtuion) for a vertical column

Parameters
[in]ktsinteger start index for vertical column
[in]kteinteger end index for vertical column
[in]qgreal array, size(kts:kte) for graupel mass mixing ratio [kg kg^-1]
[in]temperaturedouble array, size(kts:kte) temperature [K]
[in]pressuredouble array, size(kts:kte) pressure [Pa]
[in]qvreal array, size(kts:kte) water vapor mixing ratio [kg kg^-1]
[out]max_hail_diamreal maximum hail diameter [m]

Definition at line 6510 of file module_mp_thompson.F90.

References module_mp_thompson::graupel_psd_parameters().

Referenced by module_mp_thompson::mp_gt_driver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ icedemott()

real function module_mp_thompson::icedemott ( real(wp), intent(in)  tempc,
real(wp), intent(in)  qv,
real(wp), intent(in)  qvs,
real(wp), intent(in)  qvsi,
real(wp), intent(in)  rho,
real(wp), intent(in)  nifa 
)

Definition at line 5643 of file module_mp_thompson.F90.

◆ icekoop()

real function module_mp_thompson::icekoop ( real(wp), intent(in)  temp,
real(wp), intent(in)  qv,
real(wp), intent(in)  qvs,
real(wp), intent(in)  naero,
real(wp), intent(in)  dt 
)

Newer research since Koop et al (2001) suggests that the freezing rate should be lower than original paper, so J_rate is reduced by two orders of magnitude.

Definition at line 5717 of file module_mp_thompson.F90.

References module_mp_thompson::icekoop().

Referenced by module_mp_thompson::icekoop(), and module_mp_thompson::mp_thompson().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_dropletnumber()

elemental real function, public module_mp_thompson_make_number_concentrations::make_dropletnumber ( real, intent(in)  q_cloud,
real, intent(in)  qnwfa 
)

◆ make_icenumber() [1/2]

elemental real function module_mp_tempo_utils_v2::make_icenumber ( real, intent(in)  q_ice,
real, intent(in)  temp 
)

Table of lookup values of radiative effective radius of ice crystals as a function of Temperature from -94C to 0C. Taken from WRF RRTMG radiation code where it is attributed to Jon Egill Kristjansson and coauthors.

Definition at line 19 of file module_mp_tempo_utils_v2.F90.

References module_mp_tempo_utils_v2::make_icenumber().

Referenced by module_mp_tempo_utils_v2::make_icenumber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_icenumber() [2/2]

elemental real function, public module_mp_thompson_make_number_concentrations::make_icenumber ( real, intent(in)  q_ice,
real, intent(in)  temp 
)

Table of lookup values of radiative effective radius of ice crystals as a function of Temperature from -94C to 0C. Taken from WRF RRTMG radiation code where it is attributed to Jon Egill Kristjansson and coauthors.

Definition at line 35 of file module_mp_thompson_make_number_concentrations.F90.

References module_mp_thompson_make_number_concentrations::make_icenumber().

Referenced by module_mp_thompson_make_number_concentrations::make_icenumber(), and mp_thompson::mp_thompson_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_rainnumber()

elemental real function, public module_mp_thompson_make_number_concentrations::make_rainnumber ( real, intent(in)  q_rain,
real, intent(in)  temp 
)

◆ mp_gt_driver()

subroutine module_mp_thompson::mp_gt_driver ( real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  qv,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  qc,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  qr,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  qi,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  qs,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  qg,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  ni,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout)  nr,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout), optional  nc,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout), optional  nwfa,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout), optional  nifa,
real(wp), dimension(ims:ime, jms:jme), intent(in), optional  nwfa2d,
real(wp), dimension(ims:ime, jms:jme), intent(in), optional  nifa2d,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout), optional  tt,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(inout), optional  th,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(in), optional  pii,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(in)  p,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(in)  w,
real(wp), dimension(ims:ime, kms:kme, jms:jme), intent(in)  dz,
real(wp), intent(in)  dt_in,
real(wp), intent(in)  dt_inner,
logical, intent(in)  sedi_semi,
integer, intent(in)  decfl,
integer, dimension(ims:ime, jms:jme), intent(in)  lsm,
real(wp), dimension(ims:ime, jms:jme), intent(inout)  rainnc,
real(wp), dimension(ims:ime, jms:jme), intent(inout)  rainncv,
real(wp), dimension(ims:ime, jms:jme), intent(inout), optional  snownc,
real(wp), dimension(ims:ime, jms:jme), intent(inout), optional  snowncv,
real(wp), dimension(ims:ime, jms:jme), intent(inout), optional  icenc,
real(wp), dimension(ims:ime, jms:jme), intent(inout), optional  icencv,
real(wp), dimension(ims:ime, jms:jme), intent(inout), optional  graupelnc,
real(wp), dimension(ims:ime, jms:jme), intent(inout), optional  graupelncv,
real(wp), dimension(ims:ime, jms:jme), intent(inout)  sr,
  if,
  wrf_chem 
)

This is a wrapper routine designed to transfer values from 3D to 1D.

Thompson mp_gt_driver General Algorithm

  • Call mp_thompson()
  • Call calc_refl10cm()
  • Call calc_effectrad()

Definition at line 1003 of file module_mp_thompson.F90.

References module_mp_thompson::calc_effectrad(), module_mp_thompson::calc_refl10cm(), and module_mp_thompson::hail_mass_99th_percentile().

Here is the call graph for this function:

◆ mp_thompson()

subroutine module_mp_thompson::mp_thompson ( real(wp), dimension(kts:kte), intent(inout)  qv1d,
real(wp), dimension(kts:kte), intent(inout)  qc1d,
real(wp), dimension(kts:kte), intent(inout)  qi1d,
real(wp), dimension(kts:kte), intent(inout)  qr1d,
real(wp), dimension(kts:kte), intent(inout)  qs1d,
real(wp), dimension(kts:kte), intent(inout)  qg1d,
real(wp), dimension(kts:kte), intent(inout)  ni1d,
real(wp), dimension(kts:kte), intent(inout)  nr1d,
real(wp), dimension(kts:kte), intent(inout)  nc1d,
real(wp), dimension(kts:kte), intent(inout)  nwfa1d,
real(wp), dimension(kts:kte), intent(inout)  nifa1d,
real(wp), dimension(kts:kte), intent(inout)  t1d,
real(wp), dimension(kts:kte), intent(in)  p1d,
real(wp), dimension(kts:kte), intent(in)  w1d,
real(wp), dimension(kts:kte), intent(in)  dzq,
integer, intent(in)  lsml,
real(wp), intent(inout)  pptrain,
real(wp), intent(inout)  pptsnow,
real(wp), intent(inout)  pptgraul,
real(wp), intent(inout)  pptice,
  if,
  wrf_chem 
)

This subroutine computes the moisture tendencies of water vapor, cloud droplets, rain, cloud ice (pristine), snow, and graupel. Previously this code was based on Reisner et al (1998), but few of those pieces remain. A complete description is now found in Thompson et al. (2004, 2008)[191] [192].

mp_thompson General Algorithm

  • Initialize Source/sink terms. First 2 chars: "pr" represents source/sink of mass while "pn" represents source/sink of number. Next char is one of "v" for water vapor, "r" for rain, "i" for cloud ice, "w" for cloud water, "s" for snow, and "g" for graupel. Next chars represent processes: "de" for sublimation/deposition, "ev" for evaporation, "fz" for freezing, "ml" for melting, "au" for autoconversion, "nu" for ice nucleation, "hm" for Hallet/Mossop secondary ice production, and "c" for collection followed by the character for the species being collected. ALL of these terms are positive (except for deposition/sublimation terms which can switch signs based on super/subsaturation) and are treated as negatives where necessary in the tendency equations.
  • Put column of data into local arrays.
  • Derive various thermodynamic variables frequently used. Saturation vapor pressure (mixing ratio) over liquid/ice comes from Flatau et al. 1992; enthalpy (latent heat) of vaporization from Bohren & Albrecht 1998; others from Pruppacher & Klett 1978.
  • If no existing hydrometeor species and no chance to initiate ice or condense cloud water, just exit quickly!
  • Calculate y-intercept, slope, and useful moments for snow.
  • All other moments based on reference, 2nd moment. If bm_s.ne.2, then we must compute actual 2nd moment and use as reference.
  • Calculate 0th moment. Represents snow number concentration.
  • Calculate 1st moment. Useful for depositional growth and melting.
  • Calculate bm_s+1 (th) moment. Useful for diameter calcs.
  • Calculate bv_s+2 (th) moment. Useful for riming.
  • Calculate 1+(bv_s+1)/2 (th) moment. Useful for depositional growth.
  • Calculate y-intercept, slope values for graupel.
  • Calculate y-intercept, slope values for rain.
  • Compute warm-rain process terms (except evap done later).
  • Rain self-collection follows Seifert, 1994 and drop break-up follows Verlinde and Cotton, 1993. Updated after Saleeby et al 2022. RAIN2M
  • Autoconversion follows Berry & Reinhardt (1974) with characteristic diameters correctly computed from gamma distrib of cloud droplets.
  • Rain collecting cloud water. In CE, assume Dc<<Dr and vtc=~0.
  • Rain collecting aerosols, wet scavenging.
  • Compute all frozen hydrometeor species' process terms.
  • Temperature lookup table indexes.
  • Cloud water lookup table index.
  • Cloud droplet number lookup table index.
  • Cloud ice lookup table indexes.
  • Rain lookup table indexes.
  • Snow lookup table index.
  • Graupel lookup table index.
  • Deposition/sublimation prefactor (from Srivastava & Coen 1992).
  • Snow collecting cloud water. In CE, assume Dc<<Ds and vtc=~0.
  • Graupel collecting cloud water. In CE, assume Dc<<Dg and vtc=~0.
  • Snow and graupel collecting aerosols, wet scavenging.
  • Rain collecting snow. Cannot assume Wisner (1972) approximation or Mizuno (1990) approach so we solve the CE explicitly and store results in lookup table.
  • Rain collecting graupel. Cannot assume Wisner (1972) approximation or Mizuno (1990) approach so we solve the CE explicitly and store results in lookup table.
  • Put in explicit drop break-up due to collisions.
  • Deposition/sublimation of snow/graupel follows Srivastava & Coen (1992)
  • A portion of rimed snow converts to graupel but some remains snow. Interp from 15 to 95% as riming factor increases from 5.0 to 30.0 0.028 came from (.75-.15)/(30.-5.). This remains ad-hoc and should be revisited.
  • Next IF block handles only those processes below 0C.
  • Freezing of supercooled water (rain or cloud) is influenced by dust but still using Bigg 1953 with a temperature adjustment of a few degrees depending on dust concentration. A default value by way of idx_IN is 1.0 per Liter of air is used when dustyIce flag is false. Next, a combination of deposition/condensation freezing using DeMott et al (2010) dust nucleation when water saturated or Phillips et al (2008) when below water saturation; else, without dustyIce flag, use the previous Cooper (1986) temperature-dependent value. Lastly, allow homogeneous freezing of deliquesced aerosols following Koop et al. (2001, Nature). Implemented by T. Eidhammer and G. Thompson 2012Dec18
  • Ice nuclei lookup table index.
  • Freezing of water drops into graupel/cloud ice (Bigg 1953).
  • Deposition nucleation of dust/mineral from DeMott et al (2010) we may need to relax the temperature and ssati constraints.
  • Freezing of aqueous aerosols based on Koop et al (2001, Nature)
  • Deposition/sublimation of cloud ice (Srivastava & Coen 1992).
  • Some cloud ice needs to move into the snow category. Use lookup table that resulted from explicit bin representation of distrib.
  • Snow collecting cloud ice. In CE, assume Di<<Ds and vti=~0.
  • Rain collecting cloud ice. In CE, assume Di<<Dr and vti=~0.
  • Ice multiplication from rime-splinters (Hallet & Mossop 1974).
  • Melt snow and graupel and enhance from collisions with liquid. We also need to sublimate snow and graupel if subsaturated.
  • This change will be required if users run adaptive time step that results in delta-t that is generally too long to allow cloud water collection by snow/graupel above melting temperature. Credit to Bjorn-Egil Nygaard for discovering.
  • Ensure we do not deplete more hydrometeor species than exists.
  • If ice supersaturated, ensure sum of depos growth terms does not deplete more vapor than possibly exists. If subsaturated, limit sum of sublimation terms such that vapor does not reproduce ice supersat again.
  • Cloud water conservation.
  • Cloud ice conservation.
  • Rain conservation.
  • Snow conservation.
  • Graupel conservation.
  • Re-enforce proper mass conservation for subsequent elements in case any of the above terms were altered. Thanks P. Blossey. 2009Sep28
  • Calculate tendencies of all species but constrain the number of ice to reasonable values.
  • Aerosol number tendency
  • Water vapor tendency
  • Cloud water tendency
  • Cloud water number tendency
  • Cloud water mass/number balance; keep mass-wt mean size between 1 and 50 microns. Also no more than Nt_c_max drops total.
  • Cloud ice mixing ratio tendency
  • Cloud ice number tendency.
  • Cloud ice mass/number balance; keep mass-wt mean size between 5 and 300 microns. Also no more than 500 xtals per liter.
  • Rain tendency
  • Rain number tendency
  • Rain mass/number balance; keep median volume diameter between 37 microns (D0r*0.75) and 2.5 mm.
  • Snow tendency
  • Graupel tendency
  • Temperature tendency
  • Update variables for TAU+1 before condensation & sedimention.
  • With tendency-updated mixing ratios, recalculate snow moments and intercepts/slopes of graupel and rain.
  • All other moments based on reference, 2nd moment. If bm_s.ne.2, then we must compute actual 2nd moment and use as reference.
  • Calculate bm_s+1 (th) moment. Useful for diameter calcs.
  • Calculate bm_s+bv_s (th) moment. Useful for sedimentation.
  • Calculate y-intercept, slope values for graupel.
  • Calculate y-intercept, slope values for rain.
  • Cloud water condensation and evaporation. Nucleate cloud droplets using explicit CCN aerosols with hygroscopicity like sulfates using parcel model lookup table results provided by T. Eidhammer. Evap drops using calculation of max drop size capable of evaporating in single timestep and explicit number of drops smaller than Dc_star from lookup table.
  • Cloud water lookup table index.
  • If still subsaturated, allow rain to evaporate, following Srivastava & Coen (1992).
  • Rapidly eliminate near zero values when low humidity (<95%)
  • Reduce the rain evaporation in same places as melting graupel occurs. Rationale: falling and simultaneous melting graupel in subsaturated regions will not melt as fast because particle temperature stays at 0C. Also not much shedding of the water from the graupel so likely that the water-coated graupel evaporating much slower than if the water was immediately shed off.
  • Find max terminal fallspeed (distribution mass-weighted mean velocity) and use it to determine if we need to split the timestep (var nstep>1). Either way, only bother to do sedimentation below 1st level that contains any sedimenting particles (k=ksed1 on down). New in v3.0+ is computing separate for rain, ice, snow, and graupel species thus making code faster with credit to J. Schmidt.
  • Sedimentation of mixing ratio is the integral of v(D)*m(D)*N(D)*dD, whereas neglect m(D) term for number concentration. Therefore, cloud ice has proper differential sedimentation.
  • Instantly melt any cloud ice into cloud water if above 0C and instantly freeze any cloud water found below HGFR.
  • All tendencies computed, apply and pass back final values to parent.

Definition at line 1884 of file module_mp_thompson.F90.

References module_mp_thompson::activ_ncloud(), module_mp_thompson::eff_aero(), module_mp_thompson::graupel_psd_parameters(), module_mp_thompson::icekoop(), module_mp_thompson::rsif(), and module_mp_thompson::rslf().

Here is the call graph for this function:

◆ mp_thompson_run()

subroutine, public mp_thompson::mp_thompson_run ( integer, intent(in)  ncol,
integer, intent(in)  nlev,
real(kind_phys), intent(in)  con_g,
real(kind_phys), intent(in)  con_rd,
real(kind_phys), intent(in)  con_eps,
logical, intent(in)  convert_dry_rho,
real(kind_phys), dimension(:,:), intent(in)  spechum,
real(kind_phys), dimension(:,:), intent(in)  qc,
real(kind_phys), dimension(:,:), intent(in)  qr,
real(kind_phys), dimension(:,:), intent(in)  qi,
real(kind_phys), dimension(:,:), intent(in)  qs,
real(kind_phys), dimension(:,:), intent(in)  qg,
real(kind_phys), dimension(:,:), intent(in)  ni,
real(kind_phys), dimension(:,:), intent(in)  nr,
logical, intent(in)  is_aerosol_aware,
logical, intent(in)  merra2_aerosol_aware,
real(kind_phys), dimension(:,:), intent(in), optional  nc,
real(kind_phys), dimension(:,:), intent(in), optional  nwfa,
real(kind_phys), dimension(:,:), intent(in), optional  nifa,
real(kind_phys), dimension(:), intent(in), optional  nwfa2d,
real(kind_phys), dimension(:), intent(in), optional  nifa2d,
logical, intent(in), optional  aero_ind_fdb,
real(kind_phys), dimension(:,:), intent(in)  tgrs,
real(kind_phys), dimension(:,:), intent(in)  prsl,
real(kind_phys), dimension(:,:), intent(in)  phii,
real(kind_phys), dimension(:,:), intent(in)  omega,
logical, intent(in)  sedi_semi,
integer, intent(in)  decfl,
integer, dimension(:), intent(in)  islmsk,
real(kind_phys), intent(in)  dtp,
real(kind=kind_phys), intent(in)  dt_inner,
logical, intent(in)  first_time_step,
integer, intent(in)  istep,
integer, intent(in)  nsteps,
real(kind_phys), dimension(:), intent(inout)  prcp,
real(kind_phys), dimension(:), intent(inout)  rain,
real(kind_phys), dimension(:), intent(inout)  graupel,
real(kind_phys), dimension(:), intent(inout)  ice,
real(kind_phys), dimension(:), intent(inout)  snow,
real(kind_phys), dimension(:), intent(out)  sr,
real(kind_phys), dimension(:,:), intent(inout)  refl_10cm,
logical, intent(in)  fullradar_diag,
real(kind_phys), dimension(:), intent(inout)  max_hail_diam_sfc,
logical, intent(in)  do_radar_ref,
real(kind_phys), dimension(:,:,:), intent(in)  aerfld,
type(mpi_comm), intent(in)  mpicomm,
integer, intent(in)  mpirank,
integer, intent(in)  mpiroot,
logical, intent(in)  ext_diag,
real(kind_phys), dimension(:,:,:), intent(inout), optional, target  diag3d,
logical, intent(in)  reset_diag3d,
real(kind_phys), dimension(:,:), intent(in), optional  spp_wts_mp,
integer, intent(in)  spp_mp,
integer, intent(in)  n_var_spp,
real(kind_phys), dimension(:), intent(in), optional  spp_prt_list,
character(len=10), dimension(:), intent(in), optional  spp_var_list,
real(kind_phys), dimension(:), intent(in), optional  spp_stddev_cutoff,
logical, intent(in)  cplchm,
real(kind=kind_phys), dimension(:,:), intent(inout), optional  pfi_lsan,
real(kind=kind_phys), dimension(:,:), intent(inout), optional  pfl_lsan,
logical, intent(inout)  is_initialized,
real(kind_phys), intent(in), optional  fs_fac_rain,
real(kind_phys), intent(in), optional  fs_fac_snow,
real(kind_phys), dimension(:,:,:), intent(out)  ten_q,
real(kind_phys), dimension(:,:), intent(out)  dspechum,
real(kind_phys), dimension(:,:), intent(out)  dqc,
real(kind_phys), dimension(:,:), intent(out)  dqr,
real(kind_phys), dimension(:,:), intent(out)  dqi,
real(kind_phys), dimension(:,:), intent(out)  dqs,
real(kind_phys), dimension(:,:), intent(out)  dqg,
real(kind_phys), dimension(:,:), intent(out)  dni,
real(kind_phys), dimension(:,:), intent(out)  dnr,
real(kind_phys), dimension(:,:), intent(out), optional  dnc,
real(kind_phys), dimension(:,:), intent(out), optional  dnwfa,
real(kind_phys), dimension(:,:), intent(out), optional  dnifa,
real(kind_phys), dimension(:,:), intent(out)  dtgrs,
real(kind_phys), dimension(:,:), intent(out)  ten_u,
real(kind_phys), dimension(:,:), intent(out)  ten_v,
character(len=*), intent(out)  errmsg,
integer, intent(out)  errflg 
)

Argument Table

Thompson MP General Algorithm

  • Convert specific humidity to water vapor mixing ratio.
    • Also, hydrometeor variables are mass or number mixing ratio
    • either kg of species per kg of dry air, or per kg of (dry + vapor).
  • Density of air in kg m-3
  • Convert omega in Pa s-1 to vertical velocity w in m s-1
  • Layer width in m from geopotential in m2 s-2
  • Call mp_gt_driver() with or without aerosols, with or without effective radii, ...
  • Convert water vapor mixing ratio back to specific humidity
  • Convert rainfall deltas from mm to m (on physics timestep); add to inout variables

Definition at line 366 of file mp_thompson.F90.

◆ qi_aut_qs()

subroutine module_mp_thompson::qi_aut_qs

Cloud ice converting to snow since portion greater than min snow size. Given cloud ice content (kg/m**3), number concentration (#/m**3) and gamma shape parameter, mu_i, break the distrib into bins and figure out the mass/number of ice with sizes larger than D0s. Also, compute incomplete gamma function for the integration of ice depositional growth from diameter=0 to D0s. Amount of ice depositional growth is this portion of distrib while larger diameters contribute to snow growth (as in Harrington et al. 1995).

Definition at line 5000 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ qr_acr_qg()

subroutine module_mp_thompson::qr_acr_qg

Rain collecting graupel (and inverse). Explicit CE integration.

Definition at line 4396 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ qr_acr_qs()

subroutine module_mp_thompson::qr_acr_qs

Rain collecting snow (and inverse). Explicit CE integration.

Definition at line 4566 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ rsif()

real function module_mp_thompson::rsif ( real(wp), intent(in)  p,
real(wp), intent(in)  t 
)

THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESSURE.

Definition at line 5613 of file module_mp_thompson.F90.

References module_mp_thompson::rsif().

Referenced by module_radiation_clouds::cal_cldfra3(), module_mp_thompson::mp_thompson(), and module_mp_thompson::rsif().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rslf()

real function module_mp_thompson::rslf ( real(wp), intent(in)  p,
real(wp), intent(in)  t 
)

THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESSURE.

Definition at line 5578 of file module_mp_thompson.F90.

References module_mp_thompson::rslf().

Referenced by module_radiation_clouds::cal_cldfra3(), module_mp_thompson::mp_thompson(), and module_mp_thompson::rslf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ table_ccnact()

subroutine module_mp_thompson::table_ccnact ( character(len=*), intent(inout)  errmess,
integer, intent(inout)  errflag 
)

Fill the table of CCN activation data created from parcel model run by Trude Eidhammer with inputs of aerosol number concentration, vertical velocity, temperature, lognormal mean aerosol radius, and hygroscopicity, kappa. The data are read from external file and contain activated fraction of CCN for given conditions.

Definition at line 5299 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ table_dropevap()

subroutine module_mp_thompson::table_dropevap

Integrate rain size distribution from zero to D-star to compute the number of drops smaller than D-star that evaporate in a single timestep. Drops larger than D-star dont evaporate entirely so do not affect number concentration.

Definition at line 5201 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ table_efrw()

subroutine module_mp_thompson::table_efrw

Variable collision efficiency for rain collecting cloud water using method of Beard and Grover, 1974 if a/A less than 0.25; otherwise uses polynomials to get close match of Pruppacher & Klett Fig 14-9.

Definition at line 5050 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ table_efsw()

subroutine module_mp_thompson::table_efsw

Variable collision efficiency for snow collecting cloud water using method of Wang and Ji, 2000 except equate melted snow diameter to their "effective collision cross-section.".

Definition at line 5113 of file module_mp_thompson.F90.

Referenced by module_mp_thompson::thompson_init().

Here is the caller graph for this function:

◆ tempo_final()

subroutine module_mp_tempo::tempo_final

Definition at line 1455 of file module_mp_tempo.F90.

◆ thompson_final()

subroutine module_mp_thompson::thompson_final

Definition at line 1824 of file module_mp_thompson.F90.

◆ thompson_init()

subroutine module_mp_thompson::thompson_init ( logical, intent(in)  is_aerosol_aware_in,
logical, intent(in)  merra2_aerosol_aware_in,
type(mpi_comm), intent(in)  mpicomm,
integer, intent(in)  mpirank,
integer, intent(in)  mpiroot,
integer, intent(in)  threads,
character(len=*), intent(inout)  errmsg,
integer, intent(inout)  errflg 
)

This subroutine calculates simplified cloud species equations and create lookup tables in Thomspson scheme.

thompson_init General Algorithm

  • Allocate space for lookup tables (J. Michalakes 2009Jun08).
  • From Martin et al. (1994), assign gamma shape parameter mu for cloud drops according to general dispersion characteristics (disp=~0.25 for maritime and 0.45 for continental)
  • Compute Schmidt number to one-third used numerous times
  • Compute minimum ice diam from mass, min snow/graupel mass from diam
  • Compute constants various exponents and gamma() associated with cloud, rain, snow, and graupel
  • Simplify various rate equations
  • Compute rain collecting cloud water and cloud ice
  • Compute graupel collecting cloud water
  • Compute snow collecting cloud water
  • Compute snow collecting cloud ice
  • Compute evaporation of rain; ignore depositional growth of rain
  • Compute sublimation/depositional growth of snow
  • Compute melting of snow
  • Compute sublimation/depositional growth of graupel
  • Compute melting of graupel
  • Compute constants for helping find lookup table indexes
  • Create bins of cloud water (from min diameter up to 100 microns)
  • Create bins of cloud ice (from min diameter up to 2x min snow size)
  • Create bins of rain (from min diameter up to 5 mm)
  • Create bins of snow (from min diameter up to 2 cm)
  • Create bins of graupel (from min diameter up to 5 cm)
  • Create bins of cloud droplet number concentration (1 to 3000 per cc)
  • Create lookup tables for most costly calculations
  • Call table_ccnact() to read a static file containing CCN activation of aerosols. The data were created from a parcel model by Feingold & Heymsfield with further changes by Eidhammer and Kriedenweis
  • Call qi_aut_qs() to create conversion of some ice mass into snow category
  • Call radar_init() to initialize various constants for computing radar reflectivity
  • Call qr_acr_qg() to create rain collecting graupel & graupel collecting rain table
  • Call qr_acr_qs() to create rain collecting snow & snow collecting rain table
  • Call freezeh2o() to create cloud water and rain freezing (Bigg, 1953) table

Definition at line 445 of file module_mp_thompson.F90.

References module_mp_thompson::freezeh2o(), module_mp_thompson::qi_aut_qs(), module_mp_thompson::qr_acr_qg(), module_mp_thompson::qr_acr_qs(), module_mp_thompson::table_ccnact(), module_mp_thompson::table_dropevap(), module_mp_thompson::table_efrw(), and module_mp_thompson::table_efsw().

Referenced by mp_thompson::mp_thompson_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wgamma()

real function module_mp_thompson::wgamma ( real(wp), intent(in)  y)

Definition at line 5566 of file module_mp_thompson.F90.