9 Real adlnTdlnP)
const {
10 Real step[] = {0.5, 0.5, 1.};
11 Real
temp = air->
w[IDN];
12 Real pres = air->
w[IPR];
14 Real latent[1 + NVAPOR];
16 for (
int rk = 0; rk < 4; ++rk) {
19 for (
int j = 0;
j < NCLOUD; ++
j) air->
c[
j] = 0;
22 for (
int i = 1; i <= NVAPOR; ++i) {
36 for (
int i = 1; i <= NVAPOR; ++i) latent[i] = 0;
45 air->
w[IDN] =
temp * exp(chi[rk] * dlnp * step[rk]);
49 exp(1. / 6. * (chi[0] + 2. * chi[1] + 2. * chi[2] + chi[3]) * dlnp);
51 air->
w[IPR] = pres * exp(dlnp);
57 for (
int j = 0;
j < NCLOUD; ++
j) air->
c[
j] = 0;
RealArrayX TryEquilibriumTP_VaporCloud(AirParcel const &qfrac, int ivapor, Real cv_hat=0., bool misty=false) const
Calculate the equilibrium mole transfer by cloud reaction vapor -> cloud.
Real calDlnTDlnP(AirParcel const &qfrac, Real latent[]) const
Calculate moist adiabatic temperature gradient.
Real GetLatentHeatMole(int i, std::vector< Real > const &rates, Real temp) const
void EquilibrateTP(AirParcel *qfrac) const
void rk4IntegrateLnp(AirParcel *qfrac, Real dlnp, Method method, Real adlnTdlnP) const