Solution (source code)

= Solution

At fixed <temperature> and <pressure>, the <atmospheric carbon-to-oxygen ratio> controls the division of the elemental inventory among <carbon monoxide>, <methane>, <water> and other molecules. For an oxygen-rich mixture, <water> can remain after <carbon monoxide> consumes its share of <oxygen>. Increasing the <atmospheric carbon-to-oxygen ratio> reduces the oxygen available for <water>, particularly in the hotter layers where <carbon monoxide> is stable. Near or above unity there, <water> can become strongly depleted while excess <carbon> feeds <methane>, <hydrogen cyanide> and <acetylene>. This familiar hot carbon-rich behavior should not be applied unchanged to every cool layer: at $500\,\mathrm{K}$, <methane> formation can leave substantial <water> even at high <atmospheric carbon-to-oxygen ratio>.

Increasing the <atmospheric metallicity of a giant planet> at fixed elemental ratios increases the heavy-element inventory relative to <molecular hydrogen> and <helium>. Abundances of <water> and the major carbon-bearing molecules generally rise while <molecular hydrogen> remains dominant. In that regime, the <law of mass action> for $\mathrm{CO}+\mathrm{H}_2\mathrm{O}\rightleftharpoons\mathrm{CO}_2+\mathrm{H}_2$ gives
$$
f_{\rm CO_2}=K_p\frac{f_{\rm CO}f_{\rm H_2O}}{f_{\rm H_2}}.
$$
Where <carbon monoxide> and <water> each scale roughly linearly with enrichment $Z$, <carbon dioxide> consequently scales approximately as $Z^2$. This scaling changes when <molecular hydrogen> ceases to dominate or chemical partitioning changes. Higher enrichment can also favor <carbon monoxide> over <methane> at fixed conditions, increase <mean molecular weight>, and reduce the <atmospheric scale height> and transmission-feature amplitudes. Cloud formation and <atmospheric condensate rainout> alter the observable elemental ratios relative to the bulk ones.