Initialization¶
To initialize a background (base) state for a simulation with a hydrostatic atmosphere, the hydrostatic equation balancing the pressure gradient and gravity must be satisfied. This section details the procedure for the initialization of the background state. The procedure is similar for the cases with and without moisture, the only difference being that the density for the cases with moisture has to be the total density \(\rho = \rho_d(1 + q_t)\), where \(\rho_d\) is the dry density, and \(q_t\) is the total mass mixing ratio – water vapor and liquid water, instead of the dry density \(\rho_d\) for cases without moisture.
Computation of the dry density¶
We express the total pressure \(p\) as:
By definition, we have:
This gives:
which, on rearranging, yields:
To obtain \(\theta_m\), consider the density of dry air:
Substituting for \(\rho_d\) from the above equation, we get:
which implies:
We also have:
where \(p_v\) is the partial pressure of water vapor, \(r = R_d/R_v \approx 0.622\), and \(q_v\) is the vapor mass mixing ratio—the ratio of the mass of vapor to the mass of dry air. Rearranging and using \(q_v \ll r\), we get:
which, on substitution in the equation for \(\frac{T_v}{T}\), gives:
As \(q_v \ll 1\), a binomial expansion, ignoring higher-order terms, gives:
Hence, the density of dry air is given by:
Initialization with a second-order integration of the hydrostatic equation¶
We have the hydrostatic equation given by
where \(\rho = \rho_d(1 + q_t)\), \(\rho_d\) is the dry density, and \(q_t\) is the total mass mixing ratio – water vapor and liquid water. Using an average value of \(\rho\) for the integration from \(z = z(k-1)\) to \(z(k)\), we get
The density at a point is a function of the pressure, potential temperature, and relative humidity. The latter two quantities are computed using user-specified profiles, and hence, for simplicity, we write \(\rho(k) = f(p(k))\). Hence
Now, we define
This is a non-linear equation in \(p(k)\). Consider a Newton-Raphson iteration (where \(n\) denotes the iteration number) procedure
which implies
with the gradient being evaluated as
and the iteration update is given by
For the first cell (\(k=0\)), which is at a height of \(z = \frac{\Delta z}{2}\) from the base, we have
where \(p_0 = 1e5 \, \text{N/m}^2\) is the pressure at the base. Hence, we define
and the Newton-Raphson procedure is the same.