ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_MicrophysicsConstants.H
Go to the documentation of this file.
1 /*! @file ERF_MicrophysicsConstants.H
2  * \brief Physical constants and tuning parameters used only by the moisture
3  * and cloud-physics code.
4  *
5  * These constants were previously carried in Source/ERF_Constants.H, which is
6  * included (directly or transitively) by essentially every translation unit in
7  * ERF. None of them is referenced by the dycore, advection, diffusion, I/O or
8  * boundary-condition code, so they live here instead: the microphysics schemes,
9  * the superdroplet particle code, the material-property database, and the
10  * moisture utilities are the only consumers.
11  *
12  * Source/Microphysics is unconditionally on the include path for both the GNU
13  * Make build (Exec/Make.ERF) and the CMake build (CMake/BuildERFExe.cmake), so
14  * any file in ERF may include this header.
15  *
16  * Note on naming: several latent heats appear here under names inherited from
17  * the schemes they were ported from. `lcond` (2.501e6) comes with the SAM
18  * lineage, while `lat_vap` (2.5e6) comes with the CAM/WRF lineage used by
19  * WSM6/WDM6 and is numerically identical to `L_v` in ERF_Constants.H.
20  * Likewise `lat_ice` and `lfus` are the same number under two names. They are
21  * kept distinct for now so that this reorganization does not change any
22  * answers; consolidating them is a separate, answer-affecting change.
23  */
24 
25 #ifndef ERF_MICROPHYSICS_CONSTANTS_H_
26 #define ERF_MICROPHYSICS_CONSTANTS_H_
27 
28 #include <AMReX_REAL.H>
29 
30 // This header deliberately depends only on the dimensionless numeric literals,
31 // not on ERF_Constants.H. That keeps the layering one-directional: numeric ->
32 // physical -> scheme-specific. A file that needs both the thermodynamic
33 // constants and these should include ERF_Constants.H itself.
34 #include "ERF_NumericalConstants.H" // one, fourth
35 
36 //
37 // Densities of the condensed phases
38 //
39 constexpr amrex::Real rhor = amrex::Real(1000.); // Density of water, kg/m3
40 constexpr amrex::Real rhos = amrex::Real(100.); // Density of snow, kg/m3
41 constexpr amrex::Real rhog = amrex::Real(400.); // Density of graupel, kg/m3
42 constexpr amrex::Real rhoh2o = amrex::Real(1.000e3); // density of liquid water
43 
44 //
45 // Temperature thresholds that partition condensate among the hydrometeor
46 // species, and the inverse widths of the corresponding transition ranges
47 //
48 constexpr amrex::Real tbgmin = amrex::Real(253.16); // Minimum temperature for cloud water., K
49 constexpr amrex::Real tbgmax = amrex::Real(273.16); // Maximum temperature for cloud ice, K
50 constexpr amrex::Real tprmin = amrex::Real(268.16); // Minimum temperature for rain, K
51 constexpr amrex::Real tprmax = amrex::Real(283.16); // Maximum temperature for snow+graupel, K
52 constexpr amrex::Real tgrmin = amrex::Real(223.16); // Minimum temperature for graupel, K
53 constexpr amrex::Real tgrmax = amrex::Real(283.16); // Maximum temperature for graupel, K
54 
58 
59 //
60 // Terminal fall speed coefficients and exponents
61 //
62 constexpr amrex::Real a_rain = amrex::Real(842.); // Coeff.for rain term vel
63 constexpr amrex::Real b_rain = amrex::Real(0.8); // Fall speed exponent for rain
64 constexpr amrex::Real a_snow = amrex::Real(4.84); // Coeff.for snow term vel
65 constexpr amrex::Real b_snow = fourth; // Fall speed exponent for snow
66 constexpr amrex::Real a_grau = amrex::Real(94.5); // Lin (1983) (rhog=400)
67 constexpr amrex::Real b_grau = amrex::Real(0.5); // Fall speed exponent for graupel
68 
69 constexpr amrex::Real crain = b_rain / amrex::Real(4.0);
70 constexpr amrex::Real csnow = b_snow / amrex::Real(4.0);
71 constexpr amrex::Real cgrau = b_grau / amrex::Real(4.0);
72 
73 //
74 // Autoconversion
75 //
76 constexpr amrex::Real qcw0 = amrex::Real(1.e-3); // Threshold for water autoconversion, g/g
77 constexpr amrex::Real qci0 = amrex::Real(1.e-4); // Threshold for ice autoconversion, g/g
78 constexpr amrex::Real alphaelq = amrex::Real(1.e-3); // autoconversion of cloud water rate coef
79 constexpr amrex::Real betaelq = amrex::Real(1.e-3); // autoconversion of cloud ice rate coef
80 
81 //
82 // Collection efficiencies
83 //
84 constexpr amrex::Real erccoef = one; // Rain/Cloud water collection efficiency
85 constexpr amrex::Real esccoef = one; // Snow/Cloud water collection efficiency
86 constexpr amrex::Real esicoef = amrex::Real(0.1); // Snow/cloud ice collection efficiency
87 constexpr amrex::Real egccoef = one; // Graupel/Cloud water collection efficiency
88 constexpr amrex::Real egicoef = amrex::Real(0.1); // Graupel/Cloud ice collection efficiency
89 
90 //
91 // Marshall-Palmer size distribution intercepts, and the precipitate threshold
92 //
93 constexpr amrex::Real nzeror = amrex::Real(8.e6); // Intercept coeff. for rain
94 constexpr amrex::Real nzeros = amrex::Real(3.e6); // Intersept coeff. for snow
95 constexpr amrex::Real nzerog = amrex::Real(4.e6); // Intersept coeff. for graupel
96 constexpr amrex::Real qp_threshold = amrex::Real(1.e-8); // minimal rain/snow water content
97 
98 //
99 // Molecular transport coefficients entering the diffusional growth and
100 // ventilation terms
101 //
102 constexpr amrex::Real diffelq = amrex::Real(2.21e-05); // Diffusivity of water vapor, m2/s
103 constexpr amrex::Real therco = amrex::Real(2.40e-02); // Thermal conductivity of air, J/m/s/K
104 constexpr amrex::Real muelq = amrex::Real(1.717e-05); // Dynamic viscosity of air
105 
106 //
107 // Latent heats. See the note in the file header on the duplicate names.
108 //
109 constexpr amrex::Real lcond = amrex::Real(2.501e6);
110 constexpr amrex::Real lfus = amrex::Real(3.337e5);
112 
113 constexpr amrex::Real lat_vap = amrex::Real(2.5e6); // Latent heat of vaporization (J/kg)
114 constexpr amrex::Real lat_ice = amrex::Real(3.337e5); // latent heat of fusion (J/kg)
115 
116 //
117 // Water phase-change reference temperatures (CAM lineage, used by
118 // ERF_SatMethods.H). The companion parameters epsilo and omeps are plain
119 // R_d/R_v ratios rather than microphysics tuning values, so they live in
120 // ERF_Constants.H alongside RdoRv.
121 //
122 constexpr amrex::Real tmelt = amrex::Real(273.15); // melting temp.
123 constexpr amrex::Real h2otrip = amrex::Real(273.15); // Triple point temperature of water (K)
124 constexpr amrex::Real tboil = amrex::Real(373.16); // Boiling point of water at 1 atm (K)
125 constexpr amrex::Real ttrice = amrex::Real(20.00); // transition range from es over H2O to es over ice
126 
127 #endif
constexpr amrex::Real csnow
Definition: ERF_MicrophysicsConstants.H:70
constexpr amrex::Real rhog
Definition: ERF_MicrophysicsConstants.H:41
constexpr amrex::Real tprmax
Definition: ERF_MicrophysicsConstants.H:51
constexpr amrex::Real a_bg
Definition: ERF_MicrophysicsConstants.H:55
constexpr amrex::Real muelq
Definition: ERF_MicrophysicsConstants.H:104
constexpr amrex::Real lfus
Definition: ERF_MicrophysicsConstants.H:110
constexpr amrex::Real tboil
Definition: ERF_MicrophysicsConstants.H:124
constexpr amrex::Real a_gr
Definition: ERF_MicrophysicsConstants.H:57
constexpr amrex::Real lat_vap
Definition: ERF_MicrophysicsConstants.H:113
constexpr amrex::Real qci0
Definition: ERF_MicrophysicsConstants.H:77
constexpr amrex::Real nzerog
Definition: ERF_MicrophysicsConstants.H:95
constexpr amrex::Real cgrau
Definition: ERF_MicrophysicsConstants.H:71
constexpr amrex::Real tbgmax
Definition: ERF_MicrophysicsConstants.H:49
constexpr amrex::Real betaelq
Definition: ERF_MicrophysicsConstants.H:79
constexpr amrex::Real a_grau
Definition: ERF_MicrophysicsConstants.H:66
constexpr amrex::Real lsub
Definition: ERF_MicrophysicsConstants.H:111
constexpr amrex::Real alphaelq
Definition: ERF_MicrophysicsConstants.H:78
constexpr amrex::Real rhoh2o
Definition: ERF_MicrophysicsConstants.H:42
constexpr amrex::Real esicoef
Definition: ERF_MicrophysicsConstants.H:86
constexpr amrex::Real diffelq
Definition: ERF_MicrophysicsConstants.H:102
constexpr amrex::Real therco
Definition: ERF_MicrophysicsConstants.H:103
constexpr amrex::Real b_grau
Definition: ERF_MicrophysicsConstants.H:67
constexpr amrex::Real egccoef
Definition: ERF_MicrophysicsConstants.H:87
constexpr amrex::Real egicoef
Definition: ERF_MicrophysicsConstants.H:88
constexpr amrex::Real b_rain
Definition: ERF_MicrophysicsConstants.H:63
constexpr amrex::Real tmelt
Definition: ERF_MicrophysicsConstants.H:122
constexpr amrex::Real lcond
Definition: ERF_MicrophysicsConstants.H:109
constexpr amrex::Real qcw0
Definition: ERF_MicrophysicsConstants.H:76
constexpr amrex::Real tprmin
Definition: ERF_MicrophysicsConstants.H:50
constexpr amrex::Real qp_threshold
Definition: ERF_MicrophysicsConstants.H:96
constexpr amrex::Real ttrice
Definition: ERF_MicrophysicsConstants.H:125
constexpr amrex::Real nzeror
Definition: ERF_MicrophysicsConstants.H:93
constexpr amrex::Real tgrmax
Definition: ERF_MicrophysicsConstants.H:53
constexpr amrex::Real lat_ice
Definition: ERF_MicrophysicsConstants.H:114
constexpr amrex::Real tbgmin
Definition: ERF_MicrophysicsConstants.H:48
constexpr amrex::Real rhos
Definition: ERF_MicrophysicsConstants.H:40
constexpr amrex::Real esccoef
Definition: ERF_MicrophysicsConstants.H:85
constexpr amrex::Real rhor
Definition: ERF_MicrophysicsConstants.H:39
constexpr amrex::Real a_rain
Definition: ERF_MicrophysicsConstants.H:62
constexpr amrex::Real nzeros
Definition: ERF_MicrophysicsConstants.H:94
constexpr amrex::Real a_snow
Definition: ERF_MicrophysicsConstants.H:64
constexpr amrex::Real crain
Definition: ERF_MicrophysicsConstants.H:69
constexpr amrex::Real b_snow
Definition: ERF_MicrophysicsConstants.H:65
constexpr amrex::Real h2otrip
Definition: ERF_MicrophysicsConstants.H:123
constexpr amrex::Real erccoef
Definition: ERF_MicrophysicsConstants.H:84
constexpr amrex::Real tgrmin
Definition: ERF_MicrophysicsConstants.H:52
constexpr amrex::Real a_pr
Definition: ERF_MicrophysicsConstants.H:56
Dimensionless numeric literals and pure mathematical constants.
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:30
constexpr amrex::Real fourth
Definition: ERF_NumericalConstants.H:35
amrex::Real Real
Definition: ERF_ShocInterface.H:19