Constants and Units
Units
The following units are used in ERF:
Name
Units
Description
\(t\)
\(s\)
time
\(\rho\)
\(kg/m^3\)
density
\(\mathbf{u}\)
\(m/s\)
velocity
\(p\)
\(Pa\)
pressure
\(T\)
\(K\)
temperature
\(\theta\)
\(K\)
potential temperature
Constants
The following are ERF’s fixed reference values. They should not be confused with height-dependent reference-state fields or runtime inputs.
Symbol |
Value |
Meaning |
|---|---|---|
\(R_d\) |
287.0 J/(kg K) |
Dry-air gas constant. |
\(R_v\) |
461.505 J/(kg K) |
Water-vapor gas constant. |
\(C_{p,d}\) |
1004.5 J/(kg K) |
Fixed reference dry-air heat capacity. |
\(P_{00}\) |
\(10^5\) Pa |
Fixed reference pressure for potential temperature and the EOS
(the C++ constant is named |
\(g\) |
9.81 m/s2 |
Magnitude of gravitational acceleration. |
\(\Gamma\) |
1.4 |
Fixed compressible EOS exponent, consistent with \(C_{p,d}/(C_{p,d}-R_d)\) at the reference constants. |
The runtime option erf.c_p defaults to \(C_{p,d}\) but does not
change the fixed EOS exponent \(\Gamma\). If erf.c_p is changed,
thermodynamic conversions that use \(R_d/c_p\) can be inconsistent
with inverse relations using the fixed exponent. See
Governing Equations and Buoyancy.
These constants are defined in the file Source/ERF_Constants.H, which holds the
thermodynamic and dynamical constants used throughout ERF. Two companion headers hold
the rest:
Source/ERF_NumericalConstants.H– dimensionless numeric literals (zero,one,myhalf, …) and the mathematical constant \(\pi\). These carry no physical meaning; they exist so the code stays precision-agnostic between double and single builds.ERF_Constants.Hincludes this header.Source/Microphysics/ERF_MicrophysicsConstants.H– constants used only by the moisture and cloud-physics code: hydrometeor densities, the temperature thresholds that partition condensate among the hydrometeor species, terminal fall-speed coefficients, autoconversion thresholds and collection efficiencies, size-distribution intercepts, and the latent heats of condensation, fusion and sublimation. This directory is on the include path for every ERF build, so any file may include it.