670 R. Feistel et al.: Oceanographic application and numerical implementation of TEOS-10: Part 1 Ocean Sci., 6, 633-677, 2010 www.ocean-sci.net/6/633/2010/ A12 Equilibrium conditions for liquid water, ice and water vapour in air (Sect. 5.10) To determine equilibrium conditions for liquid water, ice and water vapour in air, we first expand the resulting four Eqs. (5.83; two equations), (Eqs. 5.85 and 587) with respect to small changes of the five independent variables: AfP A AA + (/» - Affi - /») AT P (A60) p AV pw) AP +(/p AV A fZ -^ AV ^ Ap AV -1/7- (P w r | Ap W —P 1 1 p w p AV + / W - / AV + a/ AV + (/r AV - Af% ~ *?) AT Ap AV = g Ih - / AV - + Aff P (P AW Y (A61) The total pressure is estimated from the mole fraction x av (A), Eq. (2.11), as P=P t /x AV (A). With A, T and P available, the required density estimates for liquid water, p w =l/ g J(T, P), and for humid air, p AV =l/g AV (A, T, P), are easily calculated from the related Gibbs functions, Eqs. (4.2) and (4.37). The equilibrium of wet ice air is computed using this ap proach with the library call set_liq-ice_air_eq_at-a. Case 2: Equilibrium at given pressure, P The temperature of wet ice air is only slightly different from the triple-point temperature, T — r t =273.16K, which is used as an initial estimate. The partial pressure of vapour is close to the triple-point pressure, P t =611.654771 Pa. From the related mole fraction estimate, xv=Pt/P, the mass frac tion A is computed, Eq. (2.9). With A, T and P available, the required density estimate for liquid water, p w —l/g^(T, P), and for humid air, p AV =l/g AV (A, T, P), are easily calcu lated from the related Gibbs functions, Eqs. (4.2) and (4.37). The equilibrium of wet ice air is computed using this ap proach with the library call set_liq-ice_air_eq_at-p. Case 3: Equilibrium at given temperature, T For brevity, / F (P, p w ) is abbreviated here by / w and similarly for its partial derivatives. For the numerical solution, one additional condition is needed, such as specification of temperature or pressure, AT=0 or AP=0. Then appropriate starting values are required to initialize the iterative determination of the remaining unknowns. Three important cases are considered in the following. The solution of Eqs. (A60)-(A63) does not provide the relative mass fractions of the three phases. Two more conditions are required to fix the latter quantities. Cases 4 and 5 address this issue. Case 1: Equilibrium at given dry-air fraction of the humid-air part, A The temperature of wet ice air is only slightly different from the triple-point temperature, T=P t =273.16 K, which is used as an initial estimate. The partial pressure of vapour is close to the triple-point pressure, P t =611.654771 Pa. At the temperature T, the pressure of wet ice air equals the melting pressure of ice, P=P melt (P), as the solution of Eq. (5.5). The partial pressure of vapour is close to the triple point pressure, P t =611.654771 Pa. From the related mole fraction estimate, xy=Pt/P, the mass fraction A is com puted, Eq. (2.9). With A, T and P available, the required density estimate for liquid water, p w —l/g^(T,P), and for humid air, p AV =l/g AV (A, T, P), are easily calculated from the related Gibbs functions, Eqs. (4.2) and (4.37). The equilibrium of wet ice air is computed using this ap proach with the library call set_liq-ice_air_eq_at-t. In the cases 1-3 above, the solution of Eqs. (A60)-(A63) defines the intensive properties A, T, P of the equilib rium but does not provide the relative mass fractions of the three phases present. The nonnegative fractions of dry air, w A , vapour, w y , liquid water, w w , and ice, w lh , are subject to only two equations, u) A +u) V -|-u) W +u) Ih =l, and w A l{w A +w y )—A. Thus, two additional conditions beyond those used in cases 1-3 are required to specify the state of the parcel completely. Alternatively, three conditions independent of the cases 1- 3 may be given. Two important cases, 4 and 5, are considered in the following. Case 4: Equilibrium at given dry-air fraction, u> A , liquid fraction, u) w and ice fraction, u> Ih In this case, the fractions of the sample’s phases are given and the necessary T — P conditions are calculated.