CAM
micro_mg_utils Module Reference

Data Types

interface  mghydrometeorprops
 
interface  rising_factorial
 
interface  var_coef
 

Functions/Subroutines

subroutine, public micro_mg_utils_init (kind, rh2o, cpair, tmelt_in, latvap, latice, dcs, ice_sed_ai, errstring)
 
type(mghydrometeorprops) function newmghydrometeorprops (rho, eff_dim, lambda_bounds, min_mean_mass)
 
pure real(r8) function rising_factorial_r8 (x, n)
 
pure real(r8) function rising_factorial_integer (x, n)
 
elemental real(r8) function calc_ab (t, qv, xxl)
 
elemental subroutine, public size_dist_param_liq (props, qcic, ncic, rho, pgam, lamc)
 
elemental subroutine, public size_dist_param_basic (props, qic, nic, lam, n0)
 
elemental subroutine, public size_dist_param_ice (props, dcst, qic, nic, lam, n0)
 
real(r8) elemental function, public avg_diameter (q, n, rho_air, rho_sub)
 
elemental real(r8) function var_coef_r8 (relvar, a)
 
elemental real(r8) function var_coef_integer (relvar, a)
 
elemental subroutine, public ice_deposition_sublimation (t, qv, qi, ni, icldm, rho, dv, qvl, qvi, dcst, dcs_tdep, berg, vap_dep, ice_sublim)
 
elemental subroutine, public kk2000_liq_autoconversion (microp_uniform, qcic, ncic, rho, relvar, mg_prc_coeff_fix, prc_coef1, prc_exp, prc_exp1, prc, nprc, nprc1)
 
elemental subroutine, public ice_autoconversion (t, qiic, lami, n0i, dcs, dcst, dcs_tdep, prci, nprci)
 
elemental subroutine, public immersion_freezing (microp_uniform, t, pgam, lamc, qcic, ncic, relvar, mnuccc, nnuccc)
 
pure subroutine, public contact_freezing (microp_uniform, t, p, rndst, nacon, pgam, lamc, qcic, ncic, relvar, mnucct, nnucct)
 
elemental subroutine, public snow_self_aggregation (t, rho, asn, rhosn, qsic, nsic, nsagg)
 
elemental subroutine, public accrete_cloud_water_snow (t, rho, asn, uns, mu, qcic, ncic, qsic, pgam, lamc, lams, n0s, psacws, npsacws)
 
elemental subroutine, public secondary_ice_production (t, psacws, msacwi, nsacwi)
 
elemental subroutine, public accrete_rain_snow (t, rho, umr, ums, unr, uns, qric, qsic, lamr, n0r, lams, n0s, pracs, npracs)
 
elemental subroutine, public heterogeneous_rain_freezing (t, qric, nric, lamr, mnuccr, nnuccr)
 
elemental subroutine, public accrete_cloud_water_rain (microp_uniform, qric, qcic, ncic, relvar, accre_enhan, pra, npra)
 
elemental subroutine, public self_collection_rain (rho, qric, nric, nragg)
 
elemental subroutine, public accrete_cloud_ice_snow (t, rho, asn, qiic, niic, qsic, lams, n0s, prai, nprai)
 
elemental subroutine, public evaporate_sublimate_precip (t, rho, dv, mu, sc, q, qvl, qvi, lcldm, precip_frac, arn, asn, qcic, qiic, qric, qsic, lamr, n0r, lams, n0s, pre, prds)
 
elemental subroutine, public bergeron_process_snow (t, rho, dv, mu, sc, qvl, qvi, asn, qcic, qsic, lams, n0s, bergs)
 
subroutine get_dcst_sc (temp, dcst)
 
pure real(r8) function no_limiter ()
 
pure logical function limiter_is_on (lim)
 

Variables

integer, parameter, public r8 = selected_real_kind(12)
 
integer, parameter, public i8 = selected_int_kind(18)
 
type(mghydrometeorprops), public mg_liq_props
 
type(mghydrometeorprops), public mg_ice_props
 
type(mghydrometeorprops), public mg_rain_props
 
type(mghydrometeorprops), public mg_snow_props
 
real(r8), parameter, public pi = 3.14159265358979323846_r8
 
real(r8), parameter, public omsm = 1._r8 - 1.e-5_r8
 
real(r8), public qsmall = huge(1.0_r8)
 
real(r8), parameter, public mincld = 0.0001_r8
 
real(r8), parameter, public rhosn = 250._r8
 
real(r8), parameter, public rhoi = 500._r8
 
real(r8), parameter, public rhow = 1000._r8
 
real(r8), parameter, public rhows = 917._r8
 
real(r8), parameter, public ac = 3.e7_r8
 
real(r8), parameter, public bc = 2._r8
 
real(r8), parameter, public as = 11.72_r8
 
real(r8), parameter, public bs = 0.41_r8
 
real(r8), public ai = huge(1.0_r8)
 
real(r8), parameter, public bi = 1._r8
 
real(r8), parameter, public ar = 841.99667_r8
 
real(r8), parameter, public br = 0.8_r8
 
real(r8), parameter, public mi0 = 4._r8/3._r8*pi*rhoi*(10.e-6_r8)**3
 
logical pergro_mods = .false.
 
integer(i8), parameter limiter_off = int(Z'7FF1111111111111', i8)
 
real(r8), parameter icsmall = 1.e-8_r8
 
real(r8), parameter dsph = 3._r8
 
real(r8), dimension(2), parameter lam_bnd_rain = 1._r8/[500.e-6_r8, 20.e-6_r8]
 
real(r8), dimension(2), parameter lam_bnd_snow = 1._r8/[2000.e-6_r8, 10.e-6_r8]
 
real(r8), parameter min_mean_mass_liq = 1.e-20_r8
 
real(r8), parameter min_mean_mass_ice = 1.e-20_r8
 
real(r8), parameter f1s = 0.86_r8
 
real(r8), parameter f2s = 0.28_r8
 
real(r8), parameter f1r = 0.78_r8
 
real(r8), parameter f2r = 0.308_r8
 
real(r8), parameter eii = 0.5_r8
 
real(r8), parameter bimm = 100._r8
 
real(r8), parameter aimm = 0.66_r8
 
real(r8), parameter droplet_mass_25um = 4._r8/3._r8*pi*rhow*(25.e-6_r8)**3
 
real(r8rv
 
real(r8cpp
 
real(r8tmelt
 
real(r8xxlv
 
real(r8xlf
 
real(r8xxls
 
real(r8gamma_bs_plus3
 
real(r8gamma_half_br_plus5
 
real(r8gamma_half_bs_plus5
 

Function/Subroutine Documentation

◆ accrete_cloud_ice_snow()

elemental subroutine, public micro_mg_utils::accrete_cloud_ice_snow ( real(r8), intent(in)  t,
real(r8), intent(in)  rho,
real(r8), intent(in)  asn,
real(r8), intent(in)  qiic,
real(r8), intent(in)  niic,
real(r8), intent(in)  qsic,
real(r8), intent(in)  lams,
real(r8), intent(in)  n0s,
real(r8), intent(out)  prai,
real(r8), intent(out)  nprai 
)
Here is the caller graph for this function:

◆ accrete_cloud_water_rain()

elemental subroutine, public micro_mg_utils::accrete_cloud_water_rain ( logical, intent(in)  microp_uniform,
real(r8), intent(in)  qric,
real(r8), intent(in)  qcic,
real(r8), intent(in)  ncic,
real(r8), intent(in)  relvar,
real(r8), intent(in)  accre_enhan,
real(r8), intent(out)  pra,
real(r8), intent(out)  npra 
)
Here is the caller graph for this function:

◆ accrete_cloud_water_snow()

elemental subroutine, public micro_mg_utils::accrete_cloud_water_snow ( real(r8), intent(in)  t,
real(r8), intent(in)  rho,
real(r8), intent(in)  asn,
real(r8), intent(in)  uns,
real(r8), intent(in)  mu,
real(r8), intent(in)  qcic,
real(r8), intent(in)  ncic,
real(r8), intent(in)  qsic,
real(r8), intent(in)  pgam,
real(r8), intent(in)  lamc,
real(r8), intent(in)  lams,
real(r8), intent(in)  n0s,
real(r8), intent(out)  psacws,
real(r8), intent(out)  npsacws 
)
Here is the caller graph for this function:

◆ accrete_rain_snow()

elemental subroutine, public micro_mg_utils::accrete_rain_snow ( real(r8), intent(in)  t,
real(r8), intent(in)  rho,
real(r8), intent(in)  umr,
real(r8), intent(in)  ums,
real(r8), intent(in)  unr,
real(r8), intent(in)  uns,
real(r8), intent(in)  qric,
real(r8), intent(in)  qsic,
real(r8), intent(in)  lamr,
real(r8), intent(in)  n0r,
real(r8), intent(in)  lams,
real(r8), intent(in)  n0s,
real(r8), intent(out)  pracs,
real(r8), intent(out)  npracs 
)
Here is the caller graph for this function:

◆ avg_diameter()

real(r8) elemental function, public micro_mg_utils::avg_diameter ( real(r8), intent(in)  q,
real(r8), intent(in)  n,
real(r8), intent(in)  rho_air,
real(r8), intent(in)  rho_sub 
)
Here is the caller graph for this function:

◆ bergeron_process_snow()

elemental subroutine, public micro_mg_utils::bergeron_process_snow ( real(r8), intent(in)  t,
real(r8), intent(in)  rho,
real(r8), intent(in)  dv,
real(r8), intent(in)  mu,
real(r8), intent(in)  sc,
real(r8), intent(in)  qvl,
real(r8), intent(in)  qvi,
real(r8), intent(in)  asn,
real(r8), intent(in)  qcic,
real(r8), intent(in)  qsic,
real(r8), intent(in)  lams,
real(r8), intent(in)  n0s,
real(r8), intent(out)  bergs 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_ab()

elemental real(r8) function micro_mg_utils::calc_ab ( real(r8), intent(in)  t,
real(r8), intent(in)  qv,
real(r8), intent(in)  xxl 
)
private
Here is the caller graph for this function:

◆ contact_freezing()

pure subroutine, public micro_mg_utils::contact_freezing ( logical, intent(in)  microp_uniform,
real(r8), dimension(:), intent(in)  t,
real(r8), dimension(:), intent(in)  p,
real(r8), dimension(:,:), intent(in)  rndst,
real(r8), dimension(:,:), intent(in)  nacon,
real(r8), dimension(:), intent(in)  pgam,
real(r8), dimension(:), intent(in)  lamc,
real(r8), dimension(:), intent(in)  qcic,
real(r8), dimension(:), intent(in)  ncic,
real(r8), dimension(:), intent(in)  relvar,
real(r8), dimension(:), intent(out)  mnucct,
real(r8), dimension(:), intent(out)  nnucct 
)
Here is the caller graph for this function:

◆ evaporate_sublimate_precip()

elemental subroutine, public micro_mg_utils::evaporate_sublimate_precip ( real(r8), intent(in)  t,
real(r8), intent(in)  rho,
real(r8), intent(in)  dv,
real(r8), intent(in)  mu,
real(r8), intent(in)  sc,
real(r8), intent(in)  q,
real(r8), intent(in)  qvl,
real(r8), intent(in)  qvi,
real(r8), intent(in)  lcldm,
real(r8), intent(in)  precip_frac,
real(r8), intent(in)  arn,
real(r8), intent(in)  asn,
real(r8), intent(in)  qcic,
real(r8), intent(in)  qiic,
real(r8), intent(in)  qric,
real(r8), intent(in)  qsic,
real(r8), intent(in)  lamr,
real(r8), intent(in)  n0r,
real(r8), intent(in)  lams,
real(r8), intent(in)  n0s,
real(r8), intent(out)  pre,
real(r8), intent(out)  prds 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dcst_sc()

subroutine micro_mg_utils::get_dcst_sc ( real(r8), intent(in)  temp,
real(r8), intent(out)  dcst 
)
private

◆ heterogeneous_rain_freezing()

elemental subroutine, public micro_mg_utils::heterogeneous_rain_freezing ( real(r8), intent(in)  t,
real(r8), intent(in)  qric,
real(r8), intent(in)  nric,
real(r8), intent(in)  lamr,
real(r8), intent(out)  mnuccr,
real(r8), intent(out)  nnuccr 
)
Here is the caller graph for this function:

◆ ice_autoconversion()

elemental subroutine, public micro_mg_utils::ice_autoconversion ( real(r8), intent(in)  t,
real(r8), intent(in)  qiic,
real(r8), intent(in)  lami,
real(r8), intent(in)  n0i,
real(r8), intent(in)  dcs,
real(r8), intent(in)  dcst,
logical, intent(in)  dcs_tdep,
real(r8), intent(out)  prci,
real(r8), intent(out)  nprci 
)
Here is the caller graph for this function:

◆ ice_deposition_sublimation()

elemental subroutine, public micro_mg_utils::ice_deposition_sublimation ( real(r8), intent(in)  t,
real(r8), intent(in)  qv,
real(r8), intent(in)  qi,
real(r8), intent(in)  ni,
real(r8), intent(in)  icldm,
real(r8), intent(in)  rho,
real(r8), intent(in)  dv,
real(r8), intent(in)  qvl,
real(r8), intent(in)  qvi,
real(r8), intent(in)  dcst,
logical, intent(in)  dcs_tdep,
real(r8), intent(out)  berg,
real(r8), intent(out)  vap_dep,
real(r8), intent(out)  ice_sublim 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ immersion_freezing()

elemental subroutine, public micro_mg_utils::immersion_freezing ( logical, intent(in)  microp_uniform,
real(r8), intent(in)  t,
real(r8), intent(in)  pgam,
real(r8), intent(in)  lamc,
real(r8), intent(in)  qcic,
real(r8), intent(in)  ncic,
real(r8), intent(in)  relvar,
real(r8), intent(out)  mnuccc,
real(r8), intent(out)  nnuccc 
)
Here is the caller graph for this function:

◆ kk2000_liq_autoconversion()

elemental subroutine, public micro_mg_utils::kk2000_liq_autoconversion ( logical, intent(in)  microp_uniform,
real(r8), intent(in)  qcic,
real(r8), intent(in)  ncic,
real(r8), intent(in)  rho,
real(r8), intent(in)  relvar,
logical, intent(in)  mg_prc_coeff_fix,
real(r8), intent(in)  prc_coef1,
real(r8), intent(in)  prc_exp,
real(r8), intent(in)  prc_exp1,
real(r8), intent(out)  prc,
real(r8), intent(out)  nprc,
real(r8), intent(out)  nprc1 
)
Here is the caller graph for this function:

◆ limiter_is_on()

pure logical function micro_mg_utils::limiter_is_on ( real(r8), intent(in)  lim)
private
Here is the caller graph for this function:

◆ micro_mg_utils_init()

subroutine, public micro_mg_utils::micro_mg_utils_init ( integer, intent(in)  kind,
real(r8), intent(in)  rh2o,
real(r8), intent(in)  cpair,
real(r8), intent(in)  tmelt_in,
real(r8), intent(in)  latvap,
real(r8), intent(in)  latice,
real(r8), intent(in)  dcs,
real(r8), intent(in)  ice_sed_ai,
character(128), intent(out)  errstring 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newmghydrometeorprops()

type(mghydrometeorprops) function micro_mg_utils::newmghydrometeorprops ( real(r8), intent(in)  rho,
real(r8), intent(in)  eff_dim,
real(r8), dimension(2), intent(in), optional  lambda_bounds,
real(r8), intent(in), optional  min_mean_mass 
)
Here is the call graph for this function:

◆ no_limiter()

pure real(r8) function micro_mg_utils::no_limiter ( )
private
Here is the caller graph for this function:

◆ rising_factorial_integer()

pure real(r8) function micro_mg_utils::rising_factorial_integer ( real(r8), intent(in)  x,
integer, intent(in)  n 
)
private

◆ rising_factorial_r8()

pure real(r8) function micro_mg_utils::rising_factorial_r8 ( real(r8), intent(in)  x,
real(r8), intent(in)  n 
)
private

◆ secondary_ice_production()

elemental subroutine, public micro_mg_utils::secondary_ice_production ( real(r8), intent(in)  t,
real(r8), intent(inout)  psacws,
real(r8), intent(out)  msacwi,
real(r8), intent(out)  nsacwi 
)
Here is the caller graph for this function:

◆ self_collection_rain()

elemental subroutine, public micro_mg_utils::self_collection_rain ( real(r8), intent(in)  rho,
real(r8), intent(in)  qric,
real(r8), intent(in)  nric,
real(r8), intent(out)  nragg 
)
Here is the caller graph for this function:

◆ size_dist_param_basic()

elemental subroutine, public micro_mg_utils::size_dist_param_basic ( type(mghydrometeorprops), intent(in)  props,
real(r8), intent(in)  qic,
real(r8), intent(inout)  nic,
real(r8), intent(out)  lam,
real(r8), intent(out), optional  n0 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_dist_param_ice()

elemental subroutine, public micro_mg_utils::size_dist_param_ice ( type(mghydrometeorprops), intent(in)  props,
real(r8), intent(in)  dcst,
real(r8), intent(in)  qic,
real(r8), intent(inout)  nic,
real(r8), intent(out)  lam,
real(r8), intent(out), optional  n0 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_dist_param_liq()

elemental subroutine, public micro_mg_utils::size_dist_param_liq ( type(mghydrometeorprops), intent(in)  props,
real(r8), intent(in)  qcic,
real(r8), intent(inout)  ncic,
real(r8), intent(in)  rho,
real(r8), intent(out)  pgam,
real(r8), intent(out)  lamc 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ snow_self_aggregation()

elemental subroutine, public micro_mg_utils::snow_self_aggregation ( real(r8), intent(in)  t,
real(r8), intent(in)  rho,
real(r8), intent(in)  asn,
real(r8), intent(in)  rhosn,
real(r8), intent(in)  qsic,
real(r8), intent(in)  nsic,
real(r8), intent(out)  nsagg 
)
Here is the caller graph for this function:

◆ var_coef_integer()

elemental real(r8) function micro_mg_utils::var_coef_integer ( real(r8), intent(in)  relvar,
integer, intent(in)  a 
)
private

◆ var_coef_r8()

elemental real(r8) function micro_mg_utils::var_coef_r8 ( real(r8), intent(in)  relvar,
real(r8), intent(in)  a 
)
private

Variable Documentation

◆ ac

real(r8), parameter, public micro_mg_utils::ac = 3.e7_r8

◆ ai

real(r8), public micro_mg_utils::ai = huge(1.0_r8)

◆ aimm

real(r8), parameter micro_mg_utils::aimm = 0.66_r8
private

◆ ar

real(r8), parameter, public micro_mg_utils::ar = 841.99667_r8

◆ as

real(r8), parameter, public micro_mg_utils::as = 11.72_r8

◆ bc

real(r8), parameter, public micro_mg_utils::bc = 2._r8

◆ bi

real(r8), parameter, public micro_mg_utils::bi = 1._r8

◆ bimm

real(r8), parameter micro_mg_utils::bimm = 100._r8
private

◆ br

real(r8), parameter, public micro_mg_utils::br = 0.8_r8

◆ bs

real(r8), parameter, public micro_mg_utils::bs = 0.41_r8

◆ cpp

real(r8) micro_mg_utils::cpp
private

◆ droplet_mass_25um

real(r8), parameter micro_mg_utils::droplet_mass_25um = 4._r8/3._r8*pi*rhow*(25.e-6_r8)**3
private

◆ dsph

real(r8), parameter micro_mg_utils::dsph = 3._r8
private

◆ eii

real(r8), parameter micro_mg_utils::eii = 0.5_r8
private

◆ f1r

real(r8), parameter micro_mg_utils::f1r = 0.78_r8
private

◆ f1s

real(r8), parameter micro_mg_utils::f1s = 0.86_r8
private

◆ f2r

real(r8), parameter micro_mg_utils::f2r = 0.308_r8
private

◆ f2s

real(r8), parameter micro_mg_utils::f2s = 0.28_r8
private

◆ gamma_bs_plus3

real(r8) micro_mg_utils::gamma_bs_plus3
private

◆ gamma_half_br_plus5

real(r8) micro_mg_utils::gamma_half_br_plus5
private

◆ gamma_half_bs_plus5

real(r8) micro_mg_utils::gamma_half_bs_plus5
private

◆ i8

integer, parameter, public micro_mg_utils::i8 = selected_int_kind(18)

◆ icsmall

real(r8), parameter micro_mg_utils::icsmall = 1.e-8_r8
private

◆ lam_bnd_rain

real(r8), dimension(2), parameter micro_mg_utils::lam_bnd_rain = 1._r8/[500.e-6_r8, 20.e-6_r8]
private

◆ lam_bnd_snow

real(r8), dimension(2), parameter micro_mg_utils::lam_bnd_snow = 1._r8/[2000.e-6_r8, 10.e-6_r8]
private

◆ limiter_off

integer(i8), parameter micro_mg_utils::limiter_off = int(Z'7FF1111111111111', i8)
private

◆ mg_ice_props

type(mghydrometeorprops), public micro_mg_utils::mg_ice_props

◆ mg_liq_props

type(mghydrometeorprops), public micro_mg_utils::mg_liq_props

◆ mg_rain_props

type(mghydrometeorprops), public micro_mg_utils::mg_rain_props

◆ mg_snow_props

type(mghydrometeorprops), public micro_mg_utils::mg_snow_props

◆ mi0

real(r8), parameter, public micro_mg_utils::mi0 = 4._r8/3._r8*pi*rhoi*(10.e-6_r8)**3

◆ min_mean_mass_ice

real(r8), parameter micro_mg_utils::min_mean_mass_ice = 1.e-20_r8
private

◆ min_mean_mass_liq

real(r8), parameter micro_mg_utils::min_mean_mass_liq = 1.e-20_r8
private

◆ mincld

real(r8), parameter, public micro_mg_utils::mincld = 0.0001_r8

◆ omsm

real(r8), parameter, public micro_mg_utils::omsm = 1._r8 - 1.e-5_r8

◆ pergro_mods

logical micro_mg_utils::pergro_mods = .false.
private

◆ pi

real(r8), parameter, public micro_mg_utils::pi = 3.14159265358979323846_r8

◆ qsmall

real(r8), public micro_mg_utils::qsmall = huge(1.0_r8)

◆ r8

integer, parameter, public micro_mg_utils::r8 = selected_real_kind(12)

◆ rhoi

real(r8), parameter, public micro_mg_utils::rhoi = 500._r8

◆ rhosn

real(r8), parameter, public micro_mg_utils::rhosn = 250._r8

◆ rhow

real(r8), parameter, public micro_mg_utils::rhow = 1000._r8

◆ rhows

real(r8), parameter, public micro_mg_utils::rhows = 917._r8

◆ rv

real(r8) micro_mg_utils::rv
private

◆ tmelt

real(r8) micro_mg_utils::tmelt
private

◆ xlf

real(r8) micro_mg_utils::xlf
private

◆ xxls

real(r8) micro_mg_utils::xxls
private

◆ xxlv

real(r8) micro_mg_utils::xxlv
private