CCPP Scientific Documentation
v5.0.0
module_mp_thompson Module Reference

Functions/Subroutines

subroutine thompson_finalize ()
 
subroutine qr_acr_qg
 Rain collecting graupel (and inverse). Explicit CE integration. More...
 
subroutine qr_acr_qs
 Rain collecting snow (and inverse). Explicit CE integration. More...
 
subroutine 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. More...
 
subroutine 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). More...
 
subroutine 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. More...
 
subroutine 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.". More...
 
real function 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). More...
 
subroutine 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. More...
 
subroutine 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. More...
 
real function activ_ncloud (Tt, Ww, NCCN)
 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. More...
 
subroutine gcf (GAMMCF, A, X, GLN)
 Returns the incomplete gamma function q(a,x) evaluated by its continued fraction representation as gammcf. More...
 
subroutine gser (GAMSER, A, X, GLN)
 Returns the incomplete gamma function p(a,x) evaluated by its series representation as gamser. More...
 
real function gammln (XX)
 Returns the value ln(gamma(xx)) for xx > 0. More...
 
real function gammp (A, X)
 
real function wgamma (y)
 
real function rslf (P, T)
 THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESSURE. More...
 
real function rsif (P, T)
 THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESSURE. More...
 
real function icedemott (tempc, qv, qvs, qvsi, rho, nifa)
 
real function 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. More...
 
real function delta_p (yy, y1, y2, aa, bb)
 Helper routine for Phillips et al (2008) ice nucleation. Trude. More...
 
subroutine calc_effectrad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, re_qc1d, re_qi1d, re_qs1d, 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. More...
 
subroutine 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. More...
 
subroutine readwrite_tables (mode, mpicomm, mpirank, mpiroot, ierr)
 
subroutine thompson_init (nwfa2d, nifa2d, nwfa, nifa, mpicomm, mpirank, mpiroot, threads, errmsg, errflg)
 This subroutine calculates simplified cloud species equations and create lookup tables in Thomspson scheme. More...
 
subroutine mp_gt_driver (WRF_CHEM )
 This is a wrapper routine designed to transfer values from 3D to 1D. More...
 
subroutine 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)[172] [173]. More...
 

Variables

logical, parameter, private iiwarm = .false.
 
logical, private is_aerosol_aware = .false.
 
logical, parameter, private dustyice = .true.
 
logical, parameter, private homogice = .true.
 
integer, parameter, private ifdry = 0
 
real, parameter, private t_0 = 273.15
 
real, parameter, private pi = 3.1415926536
 
real, parameter, private rho_w = 1000.0
 
real, parameter, private rho_s = 100.0
 
real, parameter, private rho_g = 500.0
 
real, parameter, private rho_i = 890.0
 
real, parameter nt_c = 100.E6
 
real, parameter, private nt_c_max = 1999.E6
 
real, parameter nain0 = 1.5E6
 
real, parameter nain1 = 0.5E6
 
real, parameter naccn0 = 300.0E6
 
real, parameter naccn1 = 50.0E6
 
real, parameter, private mu_r = 0.0
 
real, parameter, private mu_g = 0.0
 
real, parameter, private mu_i = 0.0
 
real, private mu_c
 
real, parameter, private mu_s = 0.6357
 
real, parameter, private kap0 = 490.6
 
real, parameter, private kap1 = 17.46
 
real, parameter, private lam0 = 20.78
 
real, parameter, private lam1 = 3.29
 
real, parameter, private gonv_min = 1.E4
 
real, parameter, private gonv_max = 3.E6
 
real, parameter, private am_r = PI*rho_w/6.0
 
real, parameter, private bm_r = 3.0
 
real, parameter, private am_s = 0.069
 
real, parameter, private bm_s = 2.0
 
real, parameter, private am_g = PI*rho_g/6.0
 
real, parameter, private bm_g = 3.0
 
real, parameter, private am_i = PI*rho_i/6.0
 
real, parameter, private bm_i = 3.0
 
real, parameter, private av_r = 4854.0
 
real, parameter, private bv_r = 1.0
 
real, parameter, private fv_r = 195.0
 
real, parameter, private av_s = 40.0
 
real, parameter, private bv_s = 0.55
 
real, parameter, private fv_s = 100.0
 
real, parameter, private av_g = 442.0
 
real, parameter, private bv_g = 0.89
 
real, parameter, private av_i = 1847.5
 
real, parameter, private bv_i = 1.0
 
real, parameter, private av_c = 0.316946E8
 
real, parameter, private bv_c = 2.0
 
real, parameter, private c_cube = 0.5
 
real, parameter, private c_sqrd = 0.15
 
real, parameter, private ef_si = 0.05
 
real, parameter, private ef_rs = 0.95
 
real, parameter, private ef_rg = 0.75
 
real, parameter, private ef_ri = 0.95
 
real, parameter, private r1 = 1.E-12
 
real, parameter, private r2 = 1.E-6
 
real, parameter eps = 1.E-15
 
real, parameter, private tno = 5.0
 
real, parameter, private ato = 0.304
 
real, parameter, private rho_not = 101325.0/(287.05*298.0)
 
real, parameter, private sc = 0.632
 
real, private sc3
 
real, parameter, private hgfr = 235.16
 Homogeneous freezing temperature. More...
 
real, parameter, private rv = 461.5
 
real, parameter, private orv = 1./Rv
 
real, parameter, private r = 287.04
 
real, parameter, private cp = 1004.0
 
real, parameter, private r_uni = 8.314
 J (mol K)-1. More...
 
double precision, parameter, private k_b = 1.38065E-23
 Boltzmann constant [J/K]. More...
 
double precision, parameter, private m_w = 18.01528E-3
 molecular mass of water [kg/mol] More...
 
double precision, parameter, private m_a = 28.96E-3
 molecular mass of air [kg/mol] More...
 
double precision, parameter, private n_avo = 6.022E23
 Avogadro number [1/mol]. More...
 
double precision, parameter, private ma_w = M_w / N_avo
 mass of water molecule [kg] More...
 
real, parameter, private ar_volume = 4./3.*PI*(2.5e-6)**3
 assume radius of 0.025 micrometer, 2.5e-6 cm More...
 
real, parameter, private lsub = 2.834E6
 
real, parameter, private lvap0 = 2.5E6
 
real, parameter, private lfus = lsub - lvap0
 
real, parameter, private olfus = 1./lfus
 
real, parameter, private xm0i = 1.E-12
 
real, parameter, private d0c = 1.E-6
 
real, parameter, private d0r = 50.E-6
 
real, parameter, private d0s = 200.E-6
 
real, parameter, private d0g = 250.E-6
 
real, private d0i
 
real, private xm0s
 
real, private xm0g
 
integer, parameter, private nbins = 100
 
integer, parameter, private nbc = nbins
 
integer, parameter, private nbi = nbins
 
integer, parameter, private nbr = nbins
 
integer, parameter, private nbs = nbins
 
integer, parameter, private nbg = nbins
 
integer, parameter, private ntb_c = 37
 
integer, parameter, private ntb_i = 64
 
integer, parameter, private ntb_r = 37
 
integer, parameter, private ntb_s = 28
 
integer, parameter, private ntb_g = 28
 
integer, parameter, private ntb_g1 = 28
 
integer, parameter, private ntb_r1 = 37
 
integer, parameter, private ntb_i1 = 55
 
integer, parameter, private ntb_t = 9
 
integer, private nic1
 
integer, private nic2
 
integer, private nii2
 
integer, private nii3
 
integer, private nir2
 
integer, private nir3
 
integer, private nis2
 
integer, private nig2
 
integer, private nig3
 
integer, parameter, private ntb_arc = 7
 
integer, parameter, private ntb_arw = 9
 
integer, parameter, private ntb_art = 7
 
integer, parameter, private ntb_arr = 5
 
integer, parameter, private ntb_ark = 4
 
integer, parameter, private ntb_in = 55
 
integer, private niin2
 
double precision, dimension(nbins+1) xdx
 
double precision, dimension(nbcdc
 
double precision, dimension(nbcdtc
 
double precision, dimension(nbidi
 
double precision, dimension(nbidti
 
double precision, dimension(nbrdr
 
double precision, dimension(nbrdtr
 
double precision, dimension(nbsds
 
double precision, dimension(nbsdts
 
double precision, dimension(nbgdg
 
double precision, dimension(nbgdtg
 
double precision, dimension(nbct_nc
 
real, dimension(ntb_c), parameter, private r_c = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, 1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, 1.e-2/)
 Lookup tables for cloud water content (kg/m**3). More...
 
real, dimension(ntb_i), parameter, private r_i = (/1.e-10,2.e-10,3.e-10,4.e-10, 5.e-10,6.e-10,7.e-10,8.e-10,9.e-10, 1.e-9,2.e-9,3.e-9,4.e-9,5.e-9,6.e-9,7.e-9,8.e-9,9.e-9, 1.e-8,2.e-8,3.e-8,4.e-8,5.e-8,6.e-8,7.e-8,8.e-8,9.e-8, 1.e-7,2.e-7,3.e-7,4.e-7,5.e-7,6.e-7,7.e-7,8.e-7,9.e-7, 1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, 1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, 1.e-3/)
 Lookup tables for cloud ice content (kg/m**3). More...
 
real, dimension(ntb_r), parameter, private r_r = (/1.e-6,2.e-6,3.e-6,4.e-6,5.e-6,6.e-6,7.e-6,8.e-6,9.e-6, 1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, 1.e-2/)
 Lookup tables for rain content (kg/m**3). More...
 
real, dimension(ntb_g), parameter, private r_g = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, 1.e-2/)
 Lookup tables for graupel content (kg/m**3). More...
 
real, dimension(ntb_s), parameter, private r_s = (/1.e-5,2.e-5,3.e-5,4.e-5,5.e-5,6.e-5,7.e-5,8.e-5,9.e-5, 1.e-4,2.e-4,3.e-4,4.e-4,5.e-4,6.e-4,7.e-4,8.e-4,9.e-4, 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,7.e-3,8.e-3,9.e-3, 1.e-2/)
 Lookup tables for snow content (kg/m**3). More...
 
real, dimension(ntb_r1), parameter, private n0r_exp = (/1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, 1.e7,2.e7,3.e7,4.e7,5.e7,6.e7,7.e7,8.e7,9.e7, 1.e8,2.e8,3.e8,4.e8,5.e8,6.e8,7.e8,8.e8,9.e8, 1.e9,2.e9,3.e9,4.e9,5.e9,6.e9,7.e9,8.e9,9.e9, 1.e10/)
 Lookup tables for rain y-intercept parameter (/m**4). More...
 
real, dimension(ntb_g1), parameter, private n0g_exp = (/1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, 1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, 1.e6,2.e6,3.e6,4.e6,5.e6,6.e6,7.e6,8.e6,9.e6, 1.e7/)
 Lookup tables for graupel y-intercept parameter (/m**4). More...
 
real, dimension(ntb_i1), parameter, private nt_i = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, 1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, 1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, 1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, 1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, 1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, 1.e6/)
 Lookup tables for ice number concentration (/m**3). More...
 
real, dimension(ntb_arc), parameter, private ta_na = (/10.0, 31.6, 100.0, 316.0, 1000.0, 3160.0, 10000.0/)
 
real, dimension(ntb_arw), parameter, private ta_ww = (/0.01, 0.0316, 0.1, 0.316, 1.0, 3.16, 10.0, 31.6, 100.0/)
 
real, dimension(ntb_art), parameter, private ta_tk = (/243.15, 253.15, 263.15, 273.15, 283.15, 293.15, 303.15/)
 
real, dimension(ntb_arr), parameter, private ta_ra = (/0.01, 0.02, 0.04, 0.08, 0.16/)
 
real, dimension(ntb_ark), parameter, private ta_ka = (/0.2, 0.4, 0.6, 0.8/)
 
real, dimension(ntb_in), parameter, private nt_in = (/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0, 1.e1,2.e1,3.e1,4.e1,5.e1,6.e1,7.e1,8.e1,9.e1, 1.e2,2.e2,3.e2,4.e2,5.e2,6.e2,7.e2,8.e2,9.e2, 1.e3,2.e3,3.e3,4.e3,5.e3,6.e3,7.e3,8.e3,9.e3, 1.e4,2.e4,3.e4,4.e4,5.e4,6.e4,7.e4,8.e4,9.e4, 1.e5,2.e5,3.e5,4.e5,5.e5,6.e5,7.e5,8.e5,9.e5, 1.e6/)
 Lookup tables for IN concentration (/m**3) from 0.001 to 1000/Liter. More...
 
real, dimension(10), parameter, private sa = (/ 5.065339, -0.062659, -3.032362, 0.029469, -0.000285, 0.31255, 0.000204, 0.003199, 0.0, -0.015952/)
 For snow moments conversions (from Field et al. 2005) More...
 
real, dimension(10), parameter, private sb = (/ 0.476221, -0.015896, 0.165977, 0.007468, -0.000141, 0.060366, 0.000079, 0.000594, 0.0, -0.003577/)
 
real, dimension(ntb_t), parameter, private tc = (/-0.01, -5., -10., -15., -20., -25., -30., -35., -40./)
 Temperatures (5 C interval 0 to -40) used in lookup tables. More...
 
integer, parameter, private r8size = 8
 
integer, parameter, private r4size = 4
 
real(kind=r8size), dimension(:,:,:,:), allocatable tcg_racg
 
real(kind=r8size), dimension(:,:,:,:), allocatable tmr_racg
 
real(kind=r8size), dimension(:,:,:,:), allocatable tcr_gacr
 
real(kind=r8size), dimension(:,:,:,:), allocatable tmg_gacr
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_racg
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_gacr
 
real(kind=r8size), dimension(:,:,:,:), allocatable tcs_racs1
 
real(kind=r8size), dimension(:,:,:,:), allocatable tmr_racs1
 
real(kind=r8size), dimension(:,:,:,:), allocatable tcs_racs2
 
real(kind=r8size), dimension(:,:,:,:), allocatable tmr_racs2
 
real(kind=r8size), dimension(:,:,:,:), allocatable tcr_sacr1
 
real(kind=r8size), dimension(:,:,:,:), allocatable tms_sacr1
 
real(kind=r8size), dimension(:,:,:,:), allocatable tcr_sacr2
 
real(kind=r8size), dimension(:,:,:,:), allocatable tms_sacr2
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_racs1
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_racs2
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_sacr1
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_sacr2
 
real(kind=r8size), dimension(:,:,:,:), allocatable tpi_qcfz
 
real(kind=r8size), dimension(:,:,:,:), allocatable tni_qcfz
 
real(kind=r8size), dimension(:,:,:,:), allocatable tpi_qrfz
 
real(kind=r8size), dimension(:,:,:,:), allocatable tpg_qrfz
 
real(kind=r8size), dimension(:,:,:,:), allocatable tni_qrfz
 
real(kind=r8size), dimension(:,:,:,:), allocatable tnr_qrfz
 
real(kind=r8size), dimension(:,:), allocatable tps_iaus
 
real(kind=r8size), dimension(:,:), allocatable tni_iaus
 
real(kind=r8size), dimension(:,:), allocatable tpi_ide
 
real(kind=r8size), dimension(:,:), allocatable t_efrw
 
real(kind=r8size), dimension(:,:), allocatable t_efsw
 
real(kind=r8size), dimension(:,:,:), allocatable tnr_rev
 
real(kind=r8size), dimension(:,:,:), allocatable tpc_wev
 
real(kind=r8size), dimension(:,:,:), allocatable tnc_wev
 
real(kind=r4size), dimension(:,:,:,:,:), allocatable tnccn_act
 
real, dimension(5, 15), private cce
 
real, dimension(5, 15), private ccg
 
real, dimension(15), private ocg1
 
real, dimension(15), private ocg2
 
real, dimension(7), private cie
 
real, dimension(7), private cig
 
real, private oig1
 
real, private oig2
 
real, private obmi
 
real, dimension(13), private cre
 
real, dimension(13), private crg
 
real, private ore1
 
real, private org1
 
real, private org2
 
real, private org3
 
real, private obmr
 
real, dimension(18), private cse
 
real, dimension(18), private csg
 
real, private oams
 
real, private obms
 
real, private ocms
 
real, dimension(12), private cge
 
real, dimension(12), private cgg
 
real, private oge1
 
real, private ogg1
 
real, private ogg2
 
real, private ogg3
 
real, private oamg
 
real, private obmg
 
real, private ocmg
 
real t1_qr_qc
 
real t1_qr_qi
 
real t2_qr_qi
 
real t1_qg_qc
 
real t1_qs_qc
 
real t1_qs_qi
 
real t1_qr_ev
 
real t2_qr_ev
 
real t1_qs_sd
 
real t2_qs_sd
 
real t1_qg_sd
 
real t2_qg_sd
 
real t1_qs_me
 
real t2_qs_me
 
real t1_qg_me
 
real t2_qg_me
 
integer mpi_communicator
 
logical thompson_table_writer