Photochemistry and Spectral Characterization of Temperate and Gas-Rich Exoplanets

Exoplanets that receive stellar irradiance of approximately Earth's or less have been discovered and many are suitable for spectral characterization. Here we focus on the temperate planets that have massive H2-dominated atmospheres, and trace the chemical reactions and transport following the photodissociation of H2O, CH4, NH3, and H2S, with K2-18 b, PH2 b, and Kepler-167 e representing temperate/cold planets around M and G/K stars. We find that NH3 is likely depleted by photodissociation to the cloud deck on planets around G/K stars but remains intact in the middle atmosphere of planets around M stars. A common phenomenon on temperate planets is that the photodissociation of NH3 in presence of CH4 results in HCN as the main photochemical product. The photodissociation of CH4 together with H2O leads to CO and CO2, and the synthesis of hydrocarbon is suppressed. Temperate planets with super-solar atmospheric metallicity and appreciable internal heat may have additional CO and CO2 from the interior and less NH3 and thus less HCN. Our models of K2-18 b can explain the transmission spectrum measured by Hubble, and indicate that future observations in 0.5-5.0 um would provide the sensitivity to detect the equilibrium gases CH4, H2O, and NH3, the photochemical gas HCN, as well as CO2 in some cases. Temperate and H2-rich exoplanets are thus laboratories of atmospheric chemistry that operate in regimes not found in the Solar System, and spectral characterization of these planets in transit or reflected starlight promises to greatly expand the types of molecules detected in exoplanet atmospheres.


INTRODUCTION
The era of characterizing temperate exoplanets has begun. Kepler, K2, and TESS missions have found a few tens of exoplanets cold enough for water to condense in their atmospheres in transiting orbits (from the NASA Exoplanet Archive). Another handful of temperate planets may be confirmed in the next few years with ongoing validation and followup of TESS planet candidates (Barclay et al. 2018). A small subset of these planets has been observed by HST for transmission spectra (De Wit et al. 2018;Zhang et al. 2018;Tsiaras et al. 2019;Benneke et al. 2019). For example, a transmission spectrum obtained by Hubble at 1.1 -1.7 µm of the temperate sub-Neptune K2-18 b shows spectral fea-tures (Tsiaras et al. 2019;Benneke et al. 2019), and the spectrum indicates that the planet hosts an atmosphere dominated by H 2 , and has H 2 O and/or CH 4 in its atmosphere (Benneke et al. 2019;Madhusudhan et al. 2020;Blain et al. 2021). TOI-1231 b is another temperate planet suitable for atmospheric studies with transits (Burt et al. 2021). With > 7 times more collecting area and infrared instruments, JWST will be capable of providing a more detailed look into the atmospheres of these temperate exoplanets (Beichman et al. 2014).
We refer to the exoplanets that receive stellar irradiance of approximately Earth's as "temperate exoplanets" and those that receive less irradiance by approximately an order of magnitude as "cold exoplanets" in this paper. Temperate and cold exoplanets include both giant planets and small planets and potentially have diverse atmospheric composition. Giant planets (Jupiters and Neptunes) have massive H 2 /He envelopes (e.g., Burrows et al. 2001), and small planets (mini-Neptunes, super-Earths, and Earth-sized planets) can have H 2 /He atmospheres with variable abundances of heavy elements, steam atmospheres mostly made of water, or secondary atmospheres from outgassing (e.g., Fortney et al. 2013;Hu & Seager 2014).
In this paper, we focus on temperate/cold and gas-rich exoplanets, which include temperate/cold giant planets and mini-Neptunes. We assume that the atmospheres are H 2 /He-dominated and massive enough for thermochemical equilibrium to prevail at depths. This condition determines that the dominant O, C, N, S species should be H 2 O, CH 4 , NH 3 , and H 2 S on temperate and cold planets in most cases (e.g., Fegley Jr & Lodders 1996;Burrows & Sharp 1999;Heng & Tsai 2016;Woitke et al. 2020). Thermochemical equilibrium may also produce N 2 as the dominant N species and substantial abundance of CO and CO 2 if the planet has a hot interior (e.g., Fortney et al. 2020). On temperate and cold planets, H 2 O can condense to form a cloud and the abovecloud H 2 O is partially depleted as a result (e.g., Morley et al. 2014;Charnay et al. 2021). Cold planets may additionally have NH 4 SH (from the combination reaction between NH 3 and H 2 S) and NH 3 condensed to form clouds (e.g., Lewis 1969; Atreya et al. 1999). This paper primarily concerns the photochemical processes above the clouds, with H 2 O, CH 4 , NH 3 , and H 2 S as the feedstock.
Past work on the atmospheric photochemistry of lowtemperature and gas-rich planets in the exoplanet context is rare. Moses et al. (2016) studied the thermochemistry and photochemistry in directly imaged young giant planets, and discussed the photochemical production of CO 2 and HCN in their atmospheres. Zahnle et al. (2016) showed that sulfur haze can form photochemically in the young Jupiter 51 Eri b, and the level of the sulfur haze would moves upward in the atmosphere when the eddy diffusion coefficient increases. Gao et al. (2017) further modeled the effect of the sulfur haze on the reflected starlight spectra of widely separated giant planets. Here we systematically study the atmospheric photochemistry of H 2 O, CH 4 , NH 3 , and H 2 S in lowtemperature exoplanetary atmospheres and model the abundance of the photochemical gases to guide the future observations of temperate/cold and gas-rich exoplanets.
The paper is organized as follows: Section 2 describes the models used in this study; Section 3 presents the results in terms of the main behaviors of atmospheric chemistry, key photochemical mechanisms, and the corresponding spectral features in transmission and reflected starlight; Section 4 discusses the prospect to detect photochemical gases in temperate and gas-rich exo-planets and potential areas of further development; and Section 5 summarizes the key findings of this study.

Atmospheric Structure Model
We use the atmospheric structure and cloud formation model in  to simulate the pressuretemperature profile and potential gas depletion by condensation in temperate and cold exoplanets.
We have updated the model with a routine to compute the condensation of NH 4 SH cloud, in a similar way as the equilibrium cloud condensation model of Atreya & Romani (1985). In short, we compare the products of the partial pressure of NH 3 and H 2 S with the equilibrium constant of the reaction that produces NH 4 SH solid (Lewis 1969), and partition the NH 3 and H 2 S in excess to form the NH 4 SH solid cloud in each atmospheric layer. We have verified that the resulting NH 4 SH cloud density and pressure level is consistent with the previously published models when applied to a Jupiter-like planet (e.g., Atreya et al. 1999).
Another update is that the model now traces the concentration of NH 3 in liquid-water cloud droplets when applicable. The model of  has included the dissolution of NH 3 in the liquid-water droplets. By additionally tracing the concentration of NH 3 in droplets, we have now taken into account the non-ideal effects when the NH 3 solution is non-dilute. When the mass ratio between NH 3 and H 2 O in the droplet is > 0.05, we replace Henry's law with the vapor pressure of NH 3 in equilibrium with the solution (Perry & Green 2007). The latter merges the solubility in the Henry's law regime to that in the Raoult's law regime smoothly. We also apply the vapor pressure of H 2 O in equilibrium with the solution, which can be substantially smaller than that with pure water when the solution is non-dilute (i.e., the Raoult's law). While the impact of these processes on the overall atmospheric composition of the planets studied in this paper -planets warmer than Jupiter -is small, these processes may control the mixing ratio of H 2 O and NH 3 in the atmospheres of even colder planets Romani et al. 1989).

Atmospheric Photochemical Model
We use the general-purpose photochemical model in Hu et al. (2012Hu et al. ( , 2013 to simulate the photochemical products in the middle atmospheres of temperate and cold exoplanets. The photochemical model includes a carbon chemistry network and a nitrogen chemistry network and their interactions (Hu et al. 2012). The photochemical model also includes a sulfur chemistry network and calculates the formation of H 2 SO 4 and S 8 aerosols when applicable (Hu et al. 2013).
We have made several updates to the original reaction network (Hu et al. 2012), and they are listed in Table 1. We have checked the main reactions that produce, remove, and exchange C 1 and C 2 hydrocarbons in the Jovian atmosphere (Gladstone et al. 1996;Moses et al. 2005) and updated rate constants when more recent values in the relevant temperature range are available in the NIST Chemical Kinetics Database. We have added low-pressure or high-pressure rate constants for threebody reactions if any of them were missing in the original reaction rate list. Certain reactions important for the hydrocarbon chemistry do not have a directly usable rate constant expression in the NIST database; rather their rates are fitted on experimental data or estimated by Moses et al. (2005). We have also added several reactions that involve NH because it may be produced by NH 3 photodissociation, and updated the rate constant of an important reaction NH 2 + CH 4 −−→ NH 3 + CH 3 to the latest calculated value. Lastly, we have removed two reactions that were incorrectly included: The photochemical model is applied to the "stratosphere" of the atmosphere, where the "tropopause" is defined as the pressure level where the temperature profile becomes adiabatic. We define the lower boundary of the model as the pressure level 10-fold greater than the tropopause pressure, and thus include a section of the "troposphere" in the model. These choices are customary in photochemical studies of giant planets' atmospheres (e.g., Gladstone et al. 1996), and reasonable because the photochemical products in the stratosphere (and above the condensation clouds) are the objective of the study. Including a section of the troposphere makes sure that the results do not strongly depend on the lower boundary conditions assumed.
We apply fixed mixing ratios as the lower boundary conditions for H 2 , He, H 2 O, CH 4 , NH 3 , and when applicable, H 2 S according to assumed the elemental abundance. When interior sources of CO, CO 2 , and N 2 are included in some scenarios (see Section 2.4 for detail), fixed mixing ratios are also applied to these gases at the lower boundary. We assume that all other species can move across the lower boundary (i.e., dry deposition when the lower boundary is a surface in terrestrial planet models) at a velocity of K zz /H, where K zz is the eddy diffusion coefficient and H is the scale height. This velocity is the upper limit of the true diffusion velocity, which could be damped by the gradient of the mixing ratio (Gladstone et al. 1996); however, the velocity only matters for long-lived species (e.g., C 2 H 6 in Jupiter). Our choice of lower boundary conditions thus results in conservative estimates of the abundance of long-lived photochemical gases.
The upper boundary is assumed at 10 −4 Pa, i.e., small enough so that the peaks of photodissociation of all species are well within the modeled atmosphere. Following Gladstone et al. (1996), we assume a zero-flux boundary condition for all species except for H, for which we include a downward flux of 4 × 10 9 cm −2 s −1 (Waite et al. 1983) to account for ionospheric processes that produce H. This influx of H was calculated for Jupiter and the actual flux can conceivably be different. The impact of this additional H is limited to the upper atmosphere and, in most of our cases, is swamped by the H from the photodissociation of H 2 O (see Section 3.4).
Since the modeled domain of the atmosphere includes the stratosphere and a small section of the upper troposphere, the standard mixing-length scaling (Gierasch & Conrath 1985) is not applicable to estimate the eddy diffusion coefficient. We instead anchor our choice of the eddy diffusion coefficient on the value in the upper troposphere of Jupiter (∼ 1 × 10 3 cm 2 s −1 , Conrath & Gierasch (1984)) and explore a larger value in the study. Above the tropopause, we assume that mixing is predominantly caused by the breaking of gravity waves and the eddy diffusion coefficient is inversely proportional to the square root of the number density (Lindzen 1981).
Because the pressure range of the photochemical model typically includes the condensation of NH 3 and H 2 O, we have added a scheme to account for the condensation of NH 3 into the photochemical model, with that for H 2 O already included in the model of Hu et al. (2012). In addition, we have added the schemes of condensation for N 2 H 4 and HCN, the two main photochemical gases expected to condense in Jupiter's upper troposphere (e.g., Atreya et al. 1977;Moses et al. 2010). The low-temperature vapor pressures of N 2 H 4 and HCN are adopted from Atreya et al. (1977) and Krasnopolsky (2009), respectively. As such, these gases are treated in the photochemical model and their production and removal paths including chemical reactions and condensation are self-consistently computed. This is important because, for example, NH 3 above the clouds in Jupiter is expected to be completely removed by photodissociation and converted to N 2 H 4 and N 2 , followed by condensation and transport to the deep atmosphere (Strobel 1973;Atreya et al. 1977;Kaye & Strobel 1983a,b;Moses et al. 2010). As we will show in Section 3, the condensation of N 2 H 4 and HCN limits their abundance in the middle atmosphere of cold planets like Kepler-167 e. For H 2 S, we make a binary choice: if the cloud model indicates NH 4 SH formation, we remove sulfur chemistry from the model, because NH 4 SH should completely sequester H 2 S (Atreya & Romani 1985); and we include the sulfur chemistry if NH 4 SH cloud is not formed. This simplifies the calculations of sulfur photochemistry and is broadly valid when N/S> 1 in the bulk atmosphere.
We calculate the cross-sections and single scattering albedo of ammonia and water cloud particles using their optical properties (Palmer & Williams 1974;Martonchik et al. 1984) and the radiative properties of the sulfur haze particles in the same way as Hu et al. (2013). NH 4 SH and HCN condensates are treated the same way as NH 3 clouds. N 2 H 4 condensates have very low abundance in all models and do not contribute significantly to the opacity. Thus, our model includes the absorption and scattering of cloud and haze particles when calculating the radiation field that drives photochemical reactions in the atmosphere.

Jupiter as a Test Case
As a test case, we have applied the coupled cloud condensation and photochemical model to a Jupiterlike planet and compared the results with the measured gas abundance in Jupiter and previous models of Jupiter's stratospheric composition (Gladstone et al. 1996;Moses et al. 2005;Atreya et al. 1977;Kaye & Strobel 1983a,b;Moses et al. 2010). Figure 1 shows the pressure-temperature profile, eddy diffusion coefficient, and the mixing ratios of CH 4 , NH 3 , and major photochemical gases of the test case. The atmospheric structure model adequately predicts the tropospheric temperature profile and the pressure level of the tropopause, but it cannot generate a temperature inversion in the middle atmosphere ( Figure 1, panel a). We have run the photochemical model with the pressure-temperature profile measured in Jupiter and the modeled pressuretemperature profile (i.e., without the temperature inversion) to see how much the photochemical gas mixing ratios change.
We find that the photochemical model can predict the mixing ratios of C 2 H 6 , C 2 H 2 , and C 2 H 4 measured in Jupiter's stratosphere, and the modeled profile of HCN is consistent with the upper limit in Jupiter's upper troposphere when the measured pressure-temperature profile is adopted (Figure 1, panel c). The only exception is the C 2 H 2 mixing ratio at ∼ 1 Pa, where the modeled mixing ratio is greater than the measured value by 2 ∼ 3σ. This less-than-perfect performance may be due to the lack of C 3 , C 4 , and higher hydrocarbons in our reaction network. For example, Moses et al. (2005) was able to fit the C 2 H 2 mixing ratio at ∼ 1 Pa together with other mixing ratio constraints, with a more complete hydrocarbon reaction network and specific choices in the eddy diffusion coefficient profiles for Jupiter's stratosphere. In terms of nitrogen photochemistry, our photochemical model finds that NH 3 is depleted by photodissociation to the cloud deck, and the vast majority of the net photochemical removal of NH 3 becomes N 2 H 4 and then condenses out. A small fraction becomes N 2 and HCN. The abundance of HCN is low (∼ 10 −9 ) in the troposphere due to the photolysis of NH 3 and CH 4 occurring at well separated pressure levels, and is limited by the cold trap near the tropopause (Figure 1). These behaviors are qualitatively similar to the past models of Jupiter's nitrogen photochemistry (Atreya et al. 1977;Kaye & Strobel 1983a,b;Moses et al. 2010). Figure 1 also indicates that adopting the modeled pressure-temperature profile that does not have a stratosphere, while preserving the overall behavior of the atmospheric photochemistry, would under-predict the mixing ratios of C 2 H 6 and C 2 H 2 by approximately half an order of magnitude. We use the atmospheric structure model in this study for speedy exploration of the main photochemical behavior, and one should keep this context in mind when interpreting the results shown in Section 3.
Another interesting point to make is that the quantum yield of H in the photodissociation C 2 H 2 has been convincingly measured to be 100% by recent experiments (Läuter et al. 2002). When producing the models shown as the solid and dashed lines in Figure 1, panel c, we have applied a quantum yield of 16% so that the topof-atmosphere rate of C 2 H 2 + hν −−→ C 2 H + H would match with the models of Gladstone et al. (1996); Moses et al. (2005). Revising the quantum yield to 100%, as shown by the dotted lines in Figure 1, panel c, slightly reduces the steady-state mixing ratio of C 2 H 6 and reduces the mixing ratio of C 2 H 2 and C 2 H 4 by a factor of ∼ 5 in the lower stratosphere (∼ 10 3 Pa). The photodissociation of C 2 H 2 is the main source of H in the lower stratosphere (e.g., Gladstone et al. 1996) and thus its quantum yield is important for the hydrocarbon chemistry in the lower stratosphere. However, a quantum yield of 100% would result in poor fits to the measured mixing ratios of C 2 H 2 and C 2 H 4 , and this potential discrepancy suggests that additional consideration of the atmospheric photochemistry of Jupiter might be warranted. We adopt the quantum yield of 100% in the subsequent models. Jupiter as a test case. The planet modeled is a Jupiter-mass and Jupiter-radius planet at a 5.2-AU orbit of a Sun-like star, having an atmospheric metallicity of 3×solar. (a) The solid line is the pressure-temperature profile adopted from Galileo probe measurements and Cassini CIRS measurements in Jupiter (the solid line; Seiff et al. 1998;Simon-Miller et al. 2006) and the dashed line is the pressure-temperature profile calculated by the atmospheric structure model. (b) The eddy diffusion coefficient profile adopted in this work. (c) The calculated mixing ratio profiles of CH4, NH3, and major photochemical products. The solid lines are the results using the measured temperature profile, the dashed lines are the results using the modeled temperature profile (i.e., without the temperature inversion), and the dotted lines are the results using the modeled temperature profile and the photodissociation quantum yield of C2H2 set to unity (see discussion in Section 2.3). In comparison are the abundance data of major hydrocarbons and HCN in Jupiter's atmosphere, as compiled in Morrissey et al. (1995); Gladstone et al. (1996); Davis et al. (1997); Yelle et al. (2001); Moses et al. (2005).

Planet Scenarios
We use the temperate sub-Neptune K2-18 b as a representative case of temperate and gas-rich planets around M dwarf stars, and use the gas giants PH2 b and Kepler-167 e as the representative cases of temperate and cold planets around G and K stars (  Blain et al. 2021;Charnay et al. 2021), but the effects of atmospheric photochemistry remain to be studied. Kepler-167 e is considered a "cold" exoplanet because it only receives stellar irradiation 7.5% of Earth's. The equilibrium cloud condensation model would predict NH 3 to condense in its atmosphere and form the uppermost cloud deck, below which NH 4 SH solids form and scavenge sulfur from the above-cloud atmosphere.
In the atmospheres of K2-18 b and PH2 b, only H 2 O is expected to condense and forms the cloud deck -and thus the physical distinction between "temperate" and "cold". The UV spectrum of K2-18 has not been measured and so we adopt that of GJ 176, a similar M dwarf star with the UV spectrum measured in the MUSCLES survey (France et al. 2016). The reconstructed Ly-α flux of GJ 176 is similar to the measured flux of K2-18 (dos Santos et al. 2020). We adopt the UV spectrum of the Sun for the models of PH2 b and Kepler-167 e, even though Kepler-167 is a K star. Figure 2 shows the incident stellar flux at the top of the atmospheres adopted in this study. K2-18 b, while having similar total irra- diation as PH2 b, receives considerably less irradiation in the near-UV. For these planets, we simulate H 2 -dominated atmospheres having 1 − 100× solar metallicities. The higherthan-solar metallicity scenario may be particularly interesting for sub-Neptunes like K2-18 b because of a proposed mass-metallicity relationship that posits a less massive planet should have a higher metallicity (Thorngren et al. 2016). For PH2 b and Kepler-167 e, we assume as fiducial values a surface gravity of 25 m s −2 and an internal heat flux that corresponds to T int = 100 K, similar to the parameters of Jupiter. Changing the surface gravity to 100 m s −2 results in slightly different cloud pressures and above-cloud abundance of gases on these planets, but do not change the qualitative behaviors of the atmospheric chemistry. For K2-18 b we assume an internal heat flux that corresponds to T int = 60 K, similar to that of Neptune.
In the standard models, we assume that the dominant O, C, N, and S species are H 2 O, CH 4 , NH 3 , and H 2 S at the base of the photochemical domain. Gases and aerosols produced in the photochemical domain can be transported through the lower boundary, and thus the standard model setup implicitly assumes that thermochemical recycling in the deep troposphere effectively recycles the photochemical products into H 2 O, CH 4 , NH 3 , and H 2 S. Here we quantitatively assess how realistic this assumption is based on the quench-point theory (e.g., Hu & Seager 2014;Zahnle & Marley 2014;Tsai et al. 2018). In that theory, the "quench point" is defined as the pressure level where the chemical lifetime of a gas equals the vertical mixing timescale (typically at the pressure of 10 7 Pa or higher). The gas is close to thermochemical equilibrium at the quench point, and its mixing ratio is carried to the atmosphere above the quench point by vertical mixing.
Figures 3 -5 show the pressure-temperature profiles of the three planets calculated by the atmospheric structure model, and the mixing ratios of major C and N molecules at the respective quench points. We adopt the chemical lifetime of the CO ← − → CH 4 and N 2 ← − → NH 3 conversions from Zahnle & Marley (2014) and estimate the eddy diffusion coefficient in the deep troposphere using the mixing-length theory in Visscher et al. (2010). The eddy diffusion coefficient depends on the assumed internal heat flux and has a typical value of ∼ 10 4 m 2 s −1 at the pressure of 10 6 − 10 8 Pa. The quench point of CO 2 follows that of CO, and similarly, that of HCN occurs at a similar pressure and temperature as N 2 (Zahnle & Marley 2014; Tsai et al. 2018). The mixing ratios of gases at the quench points are calculated using the thermochemical equilibrium model of Hu & Seager (2014). Figure 3 -5 show that a solar-metallicity atmosphere is likely deep in the CH 4 -and NH 3 -dominated regime at the quench points on all three planets. Specifically, we find the mixing ratio of CO ≤ 10 −8 , that of CO 2 ≤ 10 −11 , and the mixing ratio of NH 3 greater than that of N 2 by > 10 folds. With 10×solar metallicity, the atmosphere remains CH 4 -dominated, but the mixing ratio of CO transported from the deep troposphere can be on the order of 10 −6 ∼ 10 −5 and thus non-negligible. With the assumed internal heat flux and the modeled strength of deep tropospheric mixing, the mixing ratio of N 2 can be comparable to that of NH 3 at the quench point. As N 2 does not have strong spectral features and is not a feedstock molecule for photochemistry, the effect of a hot interior would be mostly seen as a reduction of the mixing ratio of NH 3 . The impact of the hot interior is the most significant in the 100×solar-metallicity atmosphere. Both CO and CO 2 have mixing ratios > 10 −4 at the quench point, and in the hottest case (PH2 b), the mixing ratio CO is greater than that of CH 4 . For nitrogen, the mixing ratio of NH 3 can be reduced by a factor of 10 ∼ 100 at the thermochemical equilibrium in the deep troposphere.
As a general trend, a higher deep-atmosphere temperature favors CO, CO 2 , and N 2 , and reduces the equilibrium abundance of NH 3 . We have thus run variant models for the 10× and 100×solar-metallicity cases, and used the mixing ratios of CH 4 , CO, CO 2 , NH 3 , and N 2 at the quench points as shown in Figures 3 -5 as the lower-boundary conditions. Technically the mixing ratio of deep H 2 O is also affected, but the photochemical models have lower boundaries that are well above the base of the water cloud, and are thus immune to small changes in the input water abundance. Also, we do not fix the lower-boundary mixing ratio of HCN in these models, because the mixing ratio of HCN at the quench point does not exceed the mixing ratio found by the photochemical models at the lower boundary in any case. We emphasize that specific quantities of the input gas abundance depend on the detailed thermal structure of the interior, which is related to the thermal history of the planet and exogenous factors like tidal heating, as well as the strength of vertical mixing in the interior (Fortney et al. 2020). For example, applying an internal heat flux that corresponds to T int = 30 K (similar to Earth) largely restores the CH 4 and NH 3 dominance for the three planets. While these factors are likely uncertain for many planets to be observed, the standard and variant photochemical models presented in this paper give an account of the range of possible behaviors that manifest in the observable part of the atmosphere.
CO~10 -10 CO 2 <10 -12 Figure 3. Pressure-temperature profiles of the temperate sub-Neptune K2-18 b for varied atmospheric metallicities and an internal heat flux of Tint = 60 K (similar to Neptune). The short horizontal bars show the lower boundary of the photochemical model (i.e., the pressure level 10-fold greater than the tropopause pressure). The green and red lines show the equal-abundance boundaries for major carbon and nitrogen gases in a solar-metallicity gas in thermochemical equilibrium, and the green and red dots show the expected quench point for CO and that for N2 respectively. The equilibrium mixing ratios of major C and N molecules at the respective quench points are shown.

K2-18 b: a temperate planet around an M star
For K2-18 b, our model predicts that water condenses to form a cloud at the pressure of ≥ 10 4 Pa for the solar and 10×solar cases, and at the pressure of ∼ 10 3 Pa for the 100×solar case. Above the cloud, the mixing ratio of water is depleted by approximately one order of magnitude, but not totally depleted. The pressure of cloud for the 100×solar abundance case we model is consistent with predictions of a non-gray radiative-equilibrium model and a 3D climate model, but those models do not predict a water cloud for the solar and 10×solar abundance Charnay et al. 2021). Given  the small degree of water depletion found in our models, this discrepancy does not lead to substantial errors in the results of the above-cloud photochemistry. Both CH 4 and H 2 O are photodissociated at the pressure of approximately 0.1 -1 Pa. The photodissociation results in the formation of C 2 H 6 , C 2 H 2 , CO, and CO 2 . C 2 H 2 has a high mixing ratio at the pressure where the photodissociation takes place but is quickly depleted towards higher pressures. In the middle atmosphere (∼ 10 -10 3 Pa), CO, CO 2 , and C 2 H 6 can have a mixing ratio of ∼ 1 parts-per-million (ppm) for the 100×solar abundance case, and the mixing ratio of these photochemical gases is < 1 ppm for lower metallicities. When the deep tropospheric source of CO and CO 2 is applied to the bottom of the photochemical domain, the mixing ratio of CO at 10 2 Pa is ∼ 1 ppm for the 10×solar cases, but it can reach ∼ 4000 ppm for the 100×solar case. The mixing ratio of CO 2 at 10 2 Pa can reach ∼ 500 ppm for the 100×solar case.
NH 3 is photodissociated at the pressure of 1 ∼ 10 Pa. The photodissociation results in the formation of N 2 and HCN with similar yields. The mixing ratio of HCN at ∼ 10 2 Pa is ∼ 6, 50, and 500 ppm for the solar, 10×solar, and 100×solar abundance cases, respectively. If the mixing ratio of NH 3 in the deep troposphere is applied to the bottom of the photochemical domain, the   resulting mixing ratio of HCN does not change significantly in the 10×solar case but decreases to ∼ 100 ppm in the 100×solar case.
Lastly, H 2 S is photodissociated at approximately the same pressure as the water cloud. The photodissociation leads to the formation of elemental sulfur (S 8 ) haze, as predicted previously (Zahnle et al. 2016). The haze layer extends to an altitude only slightly higher than the water cloud deck.
3.1.2. PH2 b: a temperate planet around a G/K star PH2 b has a slightly higher insolation and temperature than K2-18 b, but it receives much more near-UV irradiation ( Figure 2). The water condensation and small degree of depletion above the cloud, as well as the photodissociation of H 2 S and the location of the sulfur haze layer, are similar to those predicted for K2-18 b.
CH 4 is photodissociated at the pressure of 0.1 -1 Pa, and H 2 O is photodissociated at 1 -10 Pa. The main products of these photodissociations are still C 2 H 6 , 10 -10 10 -8 10 -6 10 -4 10 -2 10 0  C 2 H 2 , CO, and CO 2 . Instead of CO in the case of K2-18 b, CO 2 is the most abundant photochemical gas in the middle atmosphere (∼ 10 -10 3 Pa), and its mixing ratio is 2 -10 ppm, 5 -40 ppm, and 40 -200 ppm for the solar, 10×solar, and 100×solar abundance cases, respectively. The mixing ratio of CO is less by approximately one order of magnitude, and that of C 2 H 6 is ∼ 1 ppm for the 100×solar case and < 1 ppm for lower metallicities.
As a striking difference from the M star case (K2-18 b), NH 3 is fully depleted by photodissociation above the water cloud deck. The mixing ratio of NH 3 in the middle atmosphere is minimal. The photodissociation also leads to the formation of N 2 and HCN, with HCN being the most abundant photochemical product. The mixing ratio of HCN in the middle atmosphere reaches ∼ 100, 700, and 10,000 ppm for the solar, 10×solar, and 100×solar abundance cases, respectively.
With a Jupiter-like internal heat flux, the equilibrium chemistry in the deep troposphere may substantially change the chemical composition in the photochemical domain. In the 10×solar cases, the mixing ratio of CO in the middle atmosphere can reach ∼ 10 ppm and that of CO 2 ∼ 60 ppm. HCN would no longer be the most abundant nitrogen product, and its mixing ratio in the middle atmosphere can be reduced to ∼ 40 ppm. In the 100×solar cases, both CO and CO 2 can have very high mixing ratios (> 10 −2 , and on the same order of CH 4 ) in the middle atmosphere, and the above-cloud H 2 O would be consumed by photochemistry and have a mixing ratio of ∼ 10 ppm at 10 2 Pa. The mixing ratio of HCN would be further reduced to ∼ 10 ppm, while still marginally greater than the mixing ratio at the quench point.
3.1.3. Kepler-167 e: a cold planet around a G/K star The atmosphere of Kepler-167 e is much colder than that of K2-18 b or PH2 b, and its atmospheric chemistry is more akin to that of Jupiter (Gladstone et al. 1996;Moses et al. 2005;Atreya et al. 1977;Kaye & Strobel 1983a,b;Moses et al. 2010). Both H 2 O and H 2 S are fully depleted by condensation or NH 4 SH formation, and the uppermost cloud predicted by the atmospheric structure model is NH 3 ice. However, the steady-state results of the photochemical model indicate that photodissociation of NH 3 should deplete the NH 3 ice cloud. NH 3 is photochemically depleted to the pressure of 7×10 4 -10 3 Pa from the solar to 100×solar abundance cases. The main product of the photodissociation that can accumulate in the middle atmosphere is N 2 , while the mixing ratios of HCN and N 2 H 4 are limited by condensation. The mixing ratio of HCN can reach > 1 ppm below the condensation level in the 100×solar case.
The main photochemical gases of carbon are C 2 H 6 and C 2 H 2 , with no CO or CO 2 at appreciable mixing ratios. While the mixing ratio of C 2 H 2 strongly peaks at 0.1 Pa, where the photodissociation of CH 4 takes place, the mixing ratio of C 2 H 6 can be significant in the middle atmosphere. At 10 2 Pa, the mixing ratio of C 2 H 6 is ∼ 2, 4, and 30 ppm for the solar, 10×solar, and 100×solar abundance cases, respectively. If the deep tropospheric source of CO and CO 2 is applied to the bottom of the photochemical domain, they can have substantial mixing ratios in the 100×solar case, while the mixing ratio of C 2 H 6 is not strongly impacted.

Photochemical Depletion of NH 3
From Figures 6 -8, we see that NH 3 is depleted to the cloud deck in temperate and cold planets around G/K stars but remain intact in the middle atmosphere of temperate and cold planets around M stars. This finding is significant because it implies that NH 3 should be detectable on temperate planets around M stars but not around G/K stars (see Section 3.5).
The root cause of this different behavior is the M stars (represented by GJ 176 here) emit substantially lower irradiation at the near-UV wavelengths than the G/K stars (represented by the Sun here, Figure 2). The radiation that dissociates NH 3 in the H 2 -dominated atmosphere is the radiation that is not absorbed by the typically more abundant CH 4 and H 2 O. NH 3 has a dissociation limit at ∼ 230 nm while CH 4 at ∼ 150 nm and H 2 O at ∼ 240 nm, but the cross section and the shielding effect of H 2 O is small > 200 nm (Hu et al. 2012;Ranjan et al. 2020). C 2 H 2 also absorbs photons up to ∼ 230 nm but it typically does not strongly interfere with the NH 3 photodissociation due to its relatively low abundance. Thus, photons in 200 -230 nm are the most relevant for the photodissociation of NH 3 in K2-18 b and PH2 b, and photons in 150 -230 nm are the most relevant for Kepler-167 e. Having similar bolometric irradiation, the photon flux in 200 -230 nm received by PH2 b is more than that received by K2-18 b by > 2 orders of magnitude ( Figure 2). The photon flux received by Kepler-167 e is one-order-of-magnitude more than K2-18 b, and the removal of NH 3 by condensation further pushes down the pressure of photochemical depletion (see below).

Criterion of Photochemical Depletion
How does the photon flux control the pressure of photochemical depletion? Guided by the numerical results, here we develop a simple theory that estimates the pressure of photochemical depletion. Assuming that photodissociation is the only process that removes NH 3 with no recycling or production, its mixing ratio profile at the steady state should obey the following differential equation: where z is altitude, K is the eddy diffusion coefficient, N is the total number density of the atmosphere, f is the mixing ratio, and J is the photodissociation rate (often referred to as the "J-value" in the atmospheric chemistry literature). The number density has a scale height of H, and the equation can be rewritten as Assuming J, H, and K to be a constant with respect to z, the equation above has the analytical solution as where f 0 is the mixing ratio at the pressure of photochemical depletion (z = 0 for simplicity), and α is Therefore, when the product 4JH 2 /K is small, α → 0 and the mixing ratio profile is close to a constant; and when 4JH 2 /K is large, α can be 1 and thus the mixing ratio drops off very quickly. This explains the vertical profiles of NH 3 seen in Figures 6-8.
Going back to Equation (1), which can be integrated from the pressure of photochemical depletion to the top of the atmosphere, as where n ≡ f N is the number density of NH 3 . Assuming that the photoabsorption of NH 3 itself is the sole source of opacity, J can be expressed as where J ∞ is the top-of-atmosphere J-value and σ is the mean cross section of NH 3 . The differential of Equation (6) is dJ dz = σnJ.
Combining Equations (5) and (7), and recognizing df /dz vanishes at z = ∞, we obtain With J(z = 0) ∼ 0 (i.e., the J-value immediately below the pressure of photochemical depletion is minimal), and J ∞ = σI, where I is the photon flux at the top of the atmosphere, we obtain Note that to derive Equation (9), no specific profiles for J or n (f ) need to be assumed. The physical meaning of Equation (9) is that the number of NH 3 molecules that diffuse through the pressure of photochemical depletion should be equal to the number of photons received at the top of the atmosphere. This physical condition would become evident if one regards the column of NH 3 above the pressure of photochemical depletion as a whole and recognizes that one photon dissociates one molecule. To the extent that the photoabsorption of NH 3 itself is the dominant source of opacity, the criterion expressed by Equation (9)  Kepler-167 e Figure 9. Pressure of photochemical depletion of NH3 predicted by the criterion in Equations (9) and (10). We compare the left-hand side (solid line) and right-hand side (dashed line) of Equation (10), assuming a solar-abundance atmosphere. Where the solid line and the dashed line meet defines the pressure of photochemical depletion.
not depend on the mean cross section. Similarly, the criterion will be applicable to any molecule subject to photodissociation in a wavelength range largely free of interference by other molecules. It should be noted that Equation (9) cannot be derived by requiring the pressure of photochemical depletion to occur roughly at the optical depth of unity for the photodissociating radiation. This is because the mixing ratio profile in Equation (3) is valid only locally and depends on J, which in turns depends on the vertical profile of the mixing ratio. As such, one cannot integrate Equation (3) directly to find the pressure of photochemical depletion, and the optical-depth-of-unity condition is not as predictive as Equation (9).
The left-hand side of Equation (9) can be evaluated locally using Equation (3), and Equation (9) becomes where N 0 and f 0 is the total number density and the mixing ratio at the pressure of photochemical depletion. The pressure is thus P 0 = N 0 k b T where k b is the Boltzmann constant and T is temperature. α can be evaluated with Equation (4) for a J value that corresponds to 5% of the top-of-atmosphere value. Equation (10) thus provides a closed-form criterion that determines the pressure of photochemical depletion, and explains why the pressure of photochemical depletion is sensitive to the top-of-atmosphere flux of photons that drive photodissociation. Figure 9 shows both sides of Equation (10) for the three planets modeled assuming a solar-abundance atmosphere. We can see that the pressure of photochem-ical depletion implied by Equation (10) for K2-18 b is ∼ 100 Pa, consistent with the pressure where the photochemical model starts to substantially deviate from the equilibrium cloud condensation model ( Figure 6). Figure 6 also shows that the mixing ratio NH 3 decreases very slowly near the pressure of the photochemical depletion, but the decrease becomes faster for lower pressures, where the J value and the 4JH 2 /K product become greater (see Equations 3 and 4). The mixing ratio of NH 3 eventually drops below 10 −6 at the pressure lower than the pressure of photochemical depletion by approximately one order of magnitude. The pressures of photochemical depletion implied by Equation (10) for PH2 b and Kepler-167 e are close to or below the cloud deck (i.e., 10 4 −10 5 Pa), which is consistent with numerical finding that NH 3 is photodissociated to the cloud deck on these planets (Figures 7 and 8). Therefore, although Equation (10) cannot replace the full photochemical calculation due to the underlying assumptions (e.g., no recycling or production, self-shielding only), it provides a guiding estimate of whether a gas is likely depleted by photodissociation in the middle atmosphere.

Sensitivity to the eddy diffusion coefficient
From the criterion of photochemical depletion (Equation 10), we see that when the eddy diffusion coefficient increases, the pressure of photochemical depletion decreases. In other words, stronger mixing would sustain a photodissociated gas (e.g., NH 3 ) to a lower pressure or higher altitude. We have used the photochemical model to conduct a sensitivity study of the eddy diffusion coefficient, and the results confirm this understanding (Figure 10). The most significant sensitivity happens with PH2 b: the standard model predicts the photodissociation would deplete NH 3 to the cloud deck, while with a 10-fold or 100-fold greater eddy diffusion coefficient, NH 3 would be depleted at 10 2 ∼ 10 3 Pa. For Kepler-167 e, with a 10-fold or 100-fold greater eddy diffusion coefficient, photodissociation can no longer deplete the NH 3 ice cloud, while the mixing ratio of NH 3 in the middle atmosphere remains small due to condensation and photodissociation above the cloud deck.
The top of the sulfur haze layer moves up in the atmosphere when the eddy diffusion coefficient increases. For both K2-18 b and PH2 b, the top of the sulfur haze would be at ∼ 10 3 Pa and 10 2 Pa for 10-fold and 100-fold greater eddy diffusion coefficient (Figure 10). A haze layer that extends to 10 2 Pa would greatly interfere with transmission spectroscopy and also affect the spectra of the reflected starlight (see Section 3.5). This trend is consistent with the findings of Zahnle et al. (2016) and is produced by two effects acting together. First, the pres-sure of photochemical depletion of H 2 S, the feedstock of sulfur haze, decreases for a greater eddy diffusion coefficient. Second, a stronger eddy diffusion helps increase the lifetime of haze particles against falling (see the formulation in Hu et al. 2012). For PH2 b, the extended sulfur haze layer further keeps NH 3 from photochemical depletion by absorbing the ultraviolet photons that can dissociate NH 3 .
The sensitivity of main photochemical gases' abundance to the eddy diffusion coefficient is complex (Figure 10), which indicates several factors at work. For N 2 and HCN (the dominant photochemical gases of nitrogen), their mixing ratios at the lower boundary decrease with the eddy diffusion coefficient. This is because, in our model, gases move across the lower boundary at a velocity that is proportional to the eddy diffusion coefficient, and the loss to the lower boundary is the main loss mechanism for both N 2 and HCN. Their mixing ratios in the middle atmosphere do not necessarily follow the same trend as that also depends on the photochemical production (see Section 3.3). The abundance of the photochemical gases of carbon does not depend on the eddy diffusion coefficient monotonically, and this is because the formation rates of CO, CO 2 , and C 2 H 6 largely depend on the abundance of H, OH, and O, which is in turn controlled by the full chemical network involving the photodissociation of CH 4 , H 2 O, and NH 3 (see Section 3.4). For example, in K2-18 b with the solar metallicity, both CO and CO 2 have very small mixing ratios in the middle atmosphere in the standard case; the two would be substantially more abundant in the middle atmosphere with a 10-fold greater eddy diffusion coefficient, and CO would become more abundant than CO 2 with a 100-fold greater eddy diffusion coefficient. These examples highlight the richness and complexity of atmospheric photochemistry in temperate and cold planets.

Photolysis of NH 3 in the Presence of CH 4
A common phenomenon that emerges from the photochemical models is the synthesis of HCN in temperate and H 2 -rich exoplanets. The photodissociation of NH 3 in Jupiter leads to N 2 but not significant amounts of HCN, and this is mainly because NH 3 is dissociated at much higher pressures than CH 4 (e.g., Atreya et al. 1977;Kaye & Strobel 1983a,b;Moses et al. 2010). HCN in Titan's N 2 -dominated atmosphere mainly comes from the reactions between atomic nitrogen and hydrocarbons and the associated chemical network (Yung et al. 1984;Lavvas et al. 2008;Krasnopolsky 2014;Vuitton et al. 2019). Similar processes, as well as the reactions between CH and NO/N 2 O may also lead to for-  Figure 10. Sensitivity of the abundance profiles of NH3 and main photochemical gases to the eddy diffusion coefficient. The profiles of H2O and CH4 are not shown because their abundance in the middle atmosphere is not sensitive to the eddy diffusion coefficient. The horizontal orange lines show the top of the sulfur haze layer. The solid lines show the standard model, and the dashed and dash-dot lines show the models with 10-fold and 100-fold greater eddy diffusion coefficients, respectively. These models assume the solar abundance. A greater eddy diffusion coefficient causes the photodissociation of NH3 to occur at a lower pressure. mation of HCN on early Earth or rocky exoplanets with N 2 -dominated atmospheres irradiated by active stars (Airapetian et al. 2016;Rimmer & Rugheimer 2019). In addition, the formation of HCN has been commonly found in warm and hot H 2 -rich exoplanets (e.g., Moses et al. 2011;Line et al. 2011;Venot et al. 2012;Agúndez et al. 2014;Mollière et al. 2015;Moses et al. 2016;Blumenthal et al. 2018;Kawashima & Ikoma 2018;Molaverdikhani et al. 2019;Hobbs et al. 2019;Lavvas et al. 2019), and the mechanisms identified include quench kinetics Venot et al. 2012;Agúndez et al. 2014) and photochemistry (Line et al. 2011;Kawashima & Ikoma 2018;Hobbs et al. 2019).
Here we show that HCN can also build up to significant amounts in temperate exoplanets with H 2 -dominated atmospheres. Figure 11 shows the chemical network that starts with the photodissociation of NH 3 and ends with the formation of N 2 and HCN as the main photochemical products. The key condition for the synthesis of HCN is the photodissociation of NH 3 in the presence of CH 4 and at a temperature >∼ 200 K. This condition allows CH 3 , Figure 11. Chemical network from the photodissociation of NH3 in temperate and H2-dominated atmospheres. Not all reactions are shown, and the importance of the shown reactions changes from case to case. In the presence of CH4, HCN is one of the main photochemical products.
one of the ingredients for the synthesis of HCN, to be produced locally by the reaction between CH 4 and H, and this H is produced by the photodissociation of NH 3 itself. We describe the details as follows. The photodissociation of NH 3 mainly produces NH 2 , and some of the NH 2 produced is returned to NH 3 via and Another channel of the photodissociation of NH 3 is to produce NH The NH 2 channel requires photons more energetic than 230 nm and the NH channel requires photons more energetic than 165 nm. Therefore, the photons that produce NH is more easily shielded by H 2 O and CH 4 . For the three planets modeled, the NH channel is important in K2-18 b and Kepler-167 e, but not in PH2 b. This is because the photodissociation of NH 3 occurs at higher pressures in PH2 b and is object to the shielding effect of both H 2 O and CH 4 . The NH channel mostly leads to N 2 (Figure 11). The NH 2 that is not recombined to form NH 3 can undergo and the N 2 H 4 produced (if not condensed out) can then become N 2 H 3 . N 2 H 3 can react with itself to form N 2 H 2 , whose photodissociation produces N 2 , or with H to return to NH 2 (Figure 11). The other loss of NH 2 is to react with CH 3 , followed by photodissociation to form HCN, Reaction (R6) is the critical step in this HCN formation mechanism, and it requires the CH 3 radical to be available. The CH 3 in Reaction (R6) is mainly produced by Note that the photodissociation of CH 4 , which also produces CH 3 , does not contribute significantly to the source of CH 3 in Reaction (R6) because the photodissociations of CH 4 and NH 3 typically occur at very different pressures. Another formational path of HCN is through followed by photodissociation The C 2 H 3 in Reaction (R9) is mainly produced by and C 2 H 2 is ultimately produced by the photodissociation of CH 4 and then transported to the pressure of the photodissociation of NH 3 . The HCN produced in Reactions (R7 and R10) is photodissociated to form CN but CN quickly reacts with H 2 and C 2 H 2 to return to HCN. Thus, HCN does not have significant net chemical loss and is transported together with N 2 through the lower boundary.
The NH 3 -CH 4 coupling (Reactions R6-R8) dominates the formation of HCN over the NH 3 -C 2 H 2 coupling (Reactions R9-R11) in temperate H 2 -dominated atmospheres by several orders of magnitude. This is because the mixing ratio of C 2 H 2 at the the pressure of NH 3 photodissociation is typically very small on temperate planets like K2-18 b and PH2 b (Figures 6 and 7). On colder planets like Kepler-167 e, more C 2 H 2 is available and the NH 3 -C 2 H 2 coupling can contribute 1-10% of the HCN formation, consistent with the results for Jupiter . We also note that past models of warm and hot H 2 -rich exoplanets suggested different reactions to represent the NH 3 -CH 4 coupling, including NH + CH 3 (Line et al. 2011) and N + CH 3 (Kawashima & Ikoma 2018; Hobbs et al. 2019); in our models the contribution from N + CH 3 −−→ HCN + H 2 contributes to the formation of HCN less than Reactions (R6-R8) by > 3 orders of magnitude.
The efficacy of the NH 2 path to produce N 2 and HCN and the branching between N 2 and HCN depend on the abundance of H and the temperature. Reaction (R8) has an activation energy of 33.60 kJ/mol (Baulch et al. 1992) and does not occur at very low temperatures. At the pressure of NH 3 photodissociation, the temperature is 220 -240 K in [120][121][122][123][124][125][126][127][128][129][130]and ∼ 110 K in Jupiter. This makes Reaction (R8) faster by six orders of magnitude in K2-18 b and PH2 b than in Kepler-167 e or Jupiter, eventually leading to an efficient HCN production and a high abundance in the middle atmosphere. This is why the HCN production mechanism (Reactions R6-R8) does not operate efficiently in giant planets in the Solar System but can build up HCN in warmer exoplanetary atmospheres.
The abundance of H is another important control. From Figure 11, we can see that a higher abundance of H would enhance the recycling from N 2 H 4 to NH 2 , produce more NH 3 to react with NH 2 , and help the return of NH 2 to NH 3 . In other words, a higher abundance of H would reduce the overall efficacy of the NH 2 path but favor the branch that leads to HCN. At the pressure of NH 3 photodissociation, the main source of H is the combination of Reactions (R1 and R2), whose net result is the dissociation of H 2 but not NH 3 . The sink of H is mainly Reaction (R3) and the direct recombination H + H M −−→ H 2 . In high-metallicity atmospheres, another sink of H is Reaction (R5) followed by and The net result of Reactions (R5, R12, and R13) is H + H −−→ H 2 . Therefore, the chemical network that starts with the photodissociation of NH 3 is both a source and a sink of H, which feedback to determine the outcome of the network in a non-linear way. For example, the NH 2 channel is a minor pathway to form N 2 in the solar or 10×solar abundance atmosphere of K2-18 b but it becomes an important pathway in the 100× solar atmosphere. The abundance of H at the pressure of NH 3 photodissociation also explains the different sensitivity of the HCN mixing ratio on the inclusion of deep-tropospheric source of CO/CO and partial depletion of NH 3 . For K2-18 b, the reduction in the HCN mixing ratio is small or proportional to the reduction in the input NH 3 abundance, but more reduction in the HCN mixing ratio is  Gladstone et al. 1996;Moses et al. 2005). The photodissociation of H2O provides oxidizing radicals such as OH. When CH4 is photodissociated together with H2O, CO and CO2 can be formed in addition to hydrocarbons.
found for PH2 b (Figures 6 and 7). This is because the photodissociation of NH 3 occurs at higher pressures in PH2 b than in K2-18 b. When abundant CO exists, the reactions CO + H M −−→ HCO and HCO + H −−→ CO + H 2 efficiently remove H. Note that the first reaction in this cycle is three-body and only significant at sufficiently high pressures. This sink of H results in the reduction of CH 3 production (Reaction R8) and thus disfavors the branch in the NH 2 path that leads to HCN.
To summarize, the numerical models and the HCN formation mechanism presented here indicate that HCN and N 2 are generally the expected outcomes of the photodissociation of NH 3 in gaseous exoplanets that receive stellar irradiance of approximately Earth's, regardless of the stellar type.

Photolysis of CH 4 Together with H 2 O
The formation of CO and CO 2 as the most abundant photochemical gases of carbon on K2-18 b and PH2 b is another significant finding of our numerical models. The photodissociation of CH 4 in colder H 2 -dominated atmospheres -such as the giant planets' atmospheres in the Solar System -produces hydrocarbons such as C 2 H 6 and C 2 H 2 but not oxygenated species (e.g., Gladstone et al. 1996;Moses et al. 2005). This is because H 2 O condenses out and is almost completely removed from the above-cloud atmosphere (such as in Kepler-167 e, Figure  8). External sources such as comets and interplanetary dust can supply oxygen to the upper atmospheres of Jupiter and the other giant planets (e.g., Moses et al. 2005;Dobrijevic et al. 2020), but we do not include this source in the present study. For warmer planets, however, H 2 O is only moderately depleted by condensation. The above-cloud water is photodissociated at approximately the same pressure as CH 4 (Figures 6 and  7). The photodissociations of CH 4 and H 2 O together in H 2 -dominated atmospheres produces a chemical network beyond hydrocarbons ( Figure 12) and eventually lead to the formation of CO and CO 2 . Even warmer atmospheres (e.g., the atmosphere of GJ 1214 b with an effective temperature of 500 -600 K) may also have CO and CO 2 as the most abundant photochemical gases of carbon (e.g., Kempton et al. 2011;Kawashima & Ikoma 2018).
The photodissociation of CH 4 and the subsequent chemical reactions produce a wealth of hydrocarbons and radicals, and many of them (e.g., C, CH, CH 3 , C 2 H 2 , and C 2 H 4 ) lead to chemical pathways that form CO (Figure 12). Between K2-18 b and PH2 b and among the modeled metallicities, we do not see a monotonic trend regarding the relative contribution of these CO forming pathways, probably due to many chemical cycles and feedback in hydrocarbon photochemistry. CO is converted to CO 2 by the reaction with OH: Reaction (R14) is the dominant source of CO 2 in all models, and the only significant chemical loss of CO 2 is to form CO via either photodissociation or the reaction with elemental sulfur when available ( Figure 12). The CO 2 that is not returned to CO is then transported through the lower boundary.
What are the sources of OH, O, and H that power the chemical pathways shown in Figure 12? At the pressure of CH 4 and H 2 O photodissociation, the source of OH is the photodissociation of water, and the main sink is the reaction with H 2 , Reaction (R16) is the main sink of OH in all models, which means that the use of OH in the chemical pathways shown in Figure 12 does not usually become the dominant sink of OH. Reactions (R15 and R16) together is equivalent to the net dissociation of H 2 , which overtakes the photodissociation of CH 4 and subsequent hydrocarbon reactions as the dominant source of H in temperate atmospheres. Lastly, the main source of O is the photodissociation of CO and CO 2 , which eventually traces to OH and the photodissociation of water. At this point we can explain the ratio between CO 2 and CO in the middle atmosphere, which is ∼ 1 on K2-18 b and ∼ 10 on PH2 b (Figures 6 and 7). Because Reaction (R14) is the main source of CO 2 and photodissociation is the main sink, the number density of CO 2 is ∼ k R14 [CO][OH]/J CO2 , where k is the reaction rate constant and [] means the number density of a molecule. Because Reaction (R15) is the main source of OH, the number density of OH is ∝ J H2O [H 2 O]. Therefore, the ratio between CO 2 and CO is ∝ J H2O [H 2 O]/J CO2 . For any given metallicity, the abundance of H 2 O in the middle atmosphere of PH2 b is 3 ∼ 5-fold greater than that in K2-18 b because PH2 b is slightly warmer (Figures 6  and 7). And, J H2O at the top of the atmosphere on PH2 b is approximately twice that on K2-18 b, while J CO2 is similar between the two planets ( Figure 2). Together, this causes the [CO 2 ]/[CO] ratio to be greater in the atmosphere of PH2 b than in K2-18 b by ∼ 10 folds.
This trend to maintain the [CO 2 ]/[CO] ratio also controls how the atmosphere reacts to a deep-tropospheric source of CO and CO 2 that is applied as input at the lower boundary. The input CO 2 is always less than CO by one or more orders of magnitude (Figures 3-5). On PH2 b, photochemical processes convert CO into CO 2 in the middle atmosphere (∼ 10 2 Pa), and cause the steady-state mixing ratio of CO 2 to be greater than that of CO. This conversion even becomes a significant sink of H 2 O and causes H 2 O to be depleted in the middle atmosphere in the 100×solar metallicity case (Figure 7). The CO to CO 2 conversion is not so strong in the atmosphere of K2-18 b or Kepler-167 e, and their mixing ratios in the middle atmosphere are largely the input values at the lower boundary ( Figure 6).
Finally, let us turn to the impact of H 2 O and NH 3 photodissociation onto the hydrocarbon chemistry. Compared with Kepler-167 e, the mixing ratio of C 2 H 6 -the dominant, supposedly long-lived hydrocarbon -in K2-18 b and PH2 b is smaller and sometimes features an additional peak near the cloud deck (Figures 6-8). Particularly, the atmospheres of K2-18 b and PH2 b have a strong sink of C 2 H 6 at ∼ 1−10 Pa, while the atmosphere of Kepler-167 e does not. This sink is ultimately because of the high abundance of H produced by the photodissociation of H 2 O (Reactions R15 and R16). The detailed reaction path involves the formation of C 2 H 5 from C 2 H 6 (by direct reaction with H or photodissociation to form C 2 H 4 followed by H addition), and then C 2 H 5 + H −−→ 2 CH 3 . Because of the abundance of H, CH 3 mostly combines with H to form CH 4 , rather than recombines to form C 2 H 6 . It is well known that the abundance of hydrocarbons is fundamentally controlled by the relative strength between H + CH 3 M −−→ CH 4 and CH 3 + CH 3 M −−→ C 2 H 6 (e.g. Gladstone et al. 1996;Moses et al. 2005). Here we find that the added H from H 2 O photodissociation results in a net sink for C 2 H 6 in K2-18 b and PH-2 b at ∼ 1 − 10 Pa and limits the abundance of hydrocarbons in their atmospheres. This sink does not exist in the atmosphere of Kepler-167 e, because little H 2 O photodissociation occurs in its atmosphere. Additionally, near the cloud deck, the temperature is warmer, and Reaction (R8) that uses H from the photodissociation of NH 3 provides an additional source of CH 3 , and some of the CH 3 becomes C 2 H 6 and thus its peak near the cloud deck. The formation of hydrocarbons is thus strongly impacted by the water and nitrogen photochemistry.
3.5. Spectral Features of H 2 O, CH 4 , NH 3 , and Photochemical Gases 3.5.1. Transmission spectra Figures 13-15 show the transmission spectra of the temperate and cold planets K2-18 b, PH2 b, and Kepler-167 e, based on the gas and sulfur haze profiles simulated by the photochemical models. These modeled spectra can be regarded as the canonical examples of a temperate (Earth-like insolation) planet irradiated by an M dwarf star (K2-18 b, and also TOI-1231 b), a temperate (Earth-like insolation) planet irradiated by a G/K star (PH2 b), and a cold (∼ 0.1× Earth insolation) planet irradiated by a G/K star (Kepler-167 e). Here we focus on the wavelength range of 0.5 -5.0 µm, where several instruments on JWST will provide spectral capabilities (e.g., Beichman et al. 2014).
For K2-18 b, the equilibrium gases CH 4 , H 2 O, and NH 3 , as well as the photochemical gas HCN have potentially detectable spectral features in the visible to mid-infrared wavelengths ( Figure 13). Adding deeptropospheric source of CO, CO 2 , and N 2 and sink of NH 3 does not cause a significant change of the spectrum of a 10×solar metallicity atmosphere. However, a 100×solar metallicity atmosphere with deep-tropospheric source and sink would be free of the spectral features of NH 3 or HCN, but instead have potentially detectable features of CO 2 and CO.
Strikingly, the models from 1× to 100× solar abundance and with the standard eddy diffusion coefficient provide good fits to the existing transit depth measurements by K2, Hubble, and Spitzer (Tsiaras et al. 2019;Benneke et al. 2019). The models with a 100-fold greater eddy diffusion coefficient would have the sulfur haze layer extending to 10 2 Pa and mute the spectral features in 1.1 -1.7 µm, at odds with the Hubble data. Both CH 4 and H 2 O contribute to the spectral modulations seen by Hubble, which may have caused the difficulties in the identification of the gases by spectral retrieval (Tsiaras et al. 2019;Benneke et al. 2019;Blain et al. 2021).
HCN, one of the most abundant photochemical gases in the middle atmosphere, is likely detectable in K2-18 b via its spectral band at ∼ 3.0 µm. The HCN is produced from the photodissociation of NH 3 in presence of CH 4 . Also at 3.0 µm are the absorption bands of NH 3 and to a lesser extent C 2 H 2 . It would be possible to disentangle these bands with a reasonably wide wavelength coverage because NH 3 has multiple and more prominent bands in the mid-infrared (Figure 13), and because C 2 H 2 should have a minimal abundance in the middle atmosphere ( Figure 6) and contribute little to the transmission spectra.
The spectral bands of CO 2 and CO can be seen in the modeled spectra (in 4 -5 µm) of K2-18 b only when the atmosphere has super-solar metallicity and the transport from the deep troposphere is taken into account ( Figure 13). In other words, the CO and CO 2 that are produced from the photodissociation of CH 4 together with H 2 O would have too low mixing ratios to be detected. The photodissociation of CH 4 also produces C 2 H 6 . While C 2 H 6 has strong bands at 3.35 and 12 µm, they would not be detectable due to its relatively low abundance and the strong CH 4 and NH 3 bands at the same wavelength, respectively ( Figure 13).
For PH2 b, prominent spectral bands of CH 4 , H 2 O, and the photochemical gases CO 2 and HCN can be expected ( Figure 14). NH 3 is not detectable because it is depleted by photodissociation to the cloud deck (Figure 7). Even though its pressure of photochemical depletion can be reduced to ∼ 10 2 Pa for a large eddy diffusion coefficient, the sulfur haze in that case would mute spectral features that are generated from approximately the same pressure levels ( Figure 10) and thus cause NH 3 to be undetectable. HCN, CO 2 , and CO are the most abundant photochemical gases ( Figure 7); but the CO bands are intrinsically weaker and so CO 2 and HCN are the detectable photochemical gases via their spectral bands at 4.2 and 3.0 µm, respectively. Similar to K2-18 b, adding deep-tropospheric source of CO, CO 2 , and N 2 and sink of NH 3 does not cause a significant change of the spectrum of a 10×solar metallicity atmosphere. However, a 100×solar metellicity atmosphere with deep-tropospheric source and sink would not have the spectral features of H 2 O or HCN and have more prominent features of CO 2 and CO, as predicted by the photochemical model (Figure 7).   Figure 13. Modeled transmission spectra of the temperate sub-Neptune K2-18 b for varied metallicities (a) and varied eddy diffusion coefficients at the solar metallicity (b). The dashed lines show model spectra with deep-tropospheric source of CO, CO2, and N2 and sink of NH3. All models with the standard eddy diffusion coefficient fit the observed transit depths. The equilibrium gases (CH4, H2O, and NH3) and the photochemical gas HCN are detectable in the wavelength range of 0.5 -5.0 µm. The 100×solar metallicity atmosphere with deep-tropospheric source and sink can have detectable features of CO2 and CO.
Lastly for the cold planet Kepler-167 e, the transmission spectra will be dominated by the absorption bands of CH 4 (Figure 15), as H 2 O is completely removed by condensation and NH 3 by condensation and photodissociation. For a large eddy diffusion coefficient, the pressure of photochemical depletion of NH 3 can be reduced to ∼ 10 3 Pa ( Figure 10) and this can produce a spectral band of NH 3 at ∼ 3.0 µm. Thus, a search for this absorption band in the transmission spectra may constrain the eddy diffusion coefficient, although to distinguish it with a small peak due to the combined absorption of the photochemical gases HCN and C 2 H 2 (Figure 15) may involve quantification through photochemical models. The main photochemical gas in this cold atmosphere C 2 H 6 has spectral bands at 3.35 and 12 µm. The 3.35-µm band is buried by a strong CH 4 band, and while not shown in Figure 15, the 12-µm band might be detectable given appropriate instrumentation with the spectral capability in the corresponding wavelength range. Finally, the deep-troposphere-sourced CO 2 and CO in a 100×solar metallicity atmosphere may produce detectable spectral features in 4 -5 µm.
To summarize, transmission spectroscopy from the visible to mid-infrared wavelengths can provide the sensitivity to detect the equilibrium gases CH 4 and H 2 O, and the photochemical gases HCN, and in some cases CO 2 in temperate/cold and H 2 -rich exoplanets. We do not expect C 2 H 6 to be detectable. NH 3 would be de-   tectable on temperate planets around M dwarf stars but not detectable on temperate planets around G/K stars. The deep-tropospheric source and sink can have a major impact only on the transmission spectrum of a 100×solar metallicity atmosphere, where typically the features of NH 3 and HCN would be reduced and those of CO 2 and CO would be amplified. The detection and non-detection of these gases will thus test the photochemical model and improve our understanding of the photochemical mechanisms as well as tropospheric transport in temperate/cold and H 2 -dominated atmospheres.

Spectra of the reflected starlight
The temperate and cold planets around G/K stars are widely separated from their host stars and may thus also be characterized in the reflected starlight by direct imaging. Figure 16 shows the geometric albedo spectra of PH2 b and Kepler-167 e in the visible and nearinfrared wavelengths that approximately correspond to the Roman Space Telescope's coronagraph instrument (Kasdin et al. 2020) and its potential Starshade Rendezvous (Seager et al. 2019) and the HabEx concept (Gaudi et al. 2020). While PH2 b and Kepler-167 e themselves are not potential targets for these missions, their albedo spectra broadly resemble the targets in the temperate (PH2 b) and cold (Kepler-167 e) regimes.
The spectral features of CH 4 and H 2 O can be seen in the reflected starlight of PH2 b. This ability to detect H 2 O in giant planets warmer than Jupiter is consistent with MacDonald et al. (2018). In addition to the ab- sorption features of CH 4 and H 2 O, the albedo spectra of PH2 b feature the absorption of the sulfur (S 8 ) haze layer at wavelengths shorter than ∼ 0.5 µm. This result is consistent with the findings of Gao et al. (2017). For a greater eddy diffusion coefficient, the sulfur haze layer is higher and the spectral features of CH 4 and H 2 O become weaker. Interestingly, the absorption features of H 2 O are the most prominent in the solar-abundance case, and they are somewhat swamped by the adjacent CH 4 features at higher metallicities. This is because, as H 2 O condenses out, the above-cloud mixing ratio of H 2 O only slightly increases with the metallicity, while that of CH 4 increases proportionally (Figure 7). Only the absorption of CH 4 can be seen in the albedo spectra of Kepler-167 e, as H 2 O is depleted by condensation. On both planets, the spectral features of NH 3 are not seen due to its weak absorption (Irwin et al. 2018) and photochemical depletion to the cloud deck (Figures 7 and  8). The deep-tropospheric source and sink has minimal impact on the albedo spectra, unless in the 100×solar metallicity atmosphere on PH2 b where a reduction of the CH 4 features can be seen.

DISCUSSION
The results and analyses presented in Section 3 indicate that the temperate and H 2 -rich exoplanets, partic-  Patel et al. 2015), and the exoplanet observations may constrain the photochemical pathways for its formation in primordial planetary atmospheres. For K2-18 b, our model predicts that the spectral features of CH 4 can have a size of ∼ 80 ppm in the transit depth, and those of H 2 O, NH 3 , HCN, and CO 2 (from the deep troposphere) would have a size of 30 ∼ 60 ppm. These quantities are substantially above the cur-rent estimate of the potential "noise floor" of the nearinfrared instruments on JWST (<∼ 10 ppm, Schlawin et al. 2020Schlawin et al. , 2021, and are thus likely measurable. These spectral features may also be within the reach of ARIEL (Tinetti et al. 2018;Changeat et al. 2020).
An an example, we have used PandExo (Batalha et al. 2017) to estimate the overall photometric uncertainties achieved by observing the transits of K2-18 b with the G235H and G395H gratings of the NIRSpec instrument on JWST. These two channels would cover the wavelength range of 1.7 − 5.2 µm and thus provide the sensitivity to the spectral features shown in Figure 13. We find that with two visits in G235H and four visits in G395H, the overall photometric precision would be ∼ 20 ppm per spectral element at the resolution of R = 100 in both wavelength channels, and this precision should enable the detection of CH 4 , H 2 O, NH 3 , the photochemical gas HCN, and possibly CO 2 . If reducing the spectral resolution to R = 50, the number of visits would be halved, but this could cause spectral ambiguity between NH 3 and HCN because they both have absorption bands at ∼ 3.0 µm (Figure 13). Spectral ambiguity in the transmission spectra with the resolution of R ∼ 50 or less has been recently shown with Hubble at 1.1−1.7 µm (Mikal-Evans et al. 2020).

Hu
The size of the transmission spectral features expected for temperate and cold gas giants around G/K stars, such as PH2 b and Kepler-167 e, is small but probably not prohibitive. For example, our model predicts that the spectral features of CH 4 can have a size of ∼ 50 ppm in the transit depth, and those of H 2 O, CO 2 , and HCN would have a size of 20 ∼ 30 ppm. Several visits may need to be combined to achieve the photometric precision to detect these gases. Complementary to transmission spectroscopy, future direct-imaging missions can readily detect CH 4 , H 2 O, and clouds (e.g., Damiano & Hu 2020), as well as the sulfur haze produced by atmospheric photochemistry.
While we focus on temperate and cold planets in this paper, the photochemical mechanisms and the predictions on the gas formation and spectral features should remain applicable to the planets that are only slightly warmer than K2-18 b and PH2 b. This is because the results on these planets do not rely on the formation of water clouds. We suspect that the results should be applicable as long as the dominant O, C, N, S species in thermochemical equilibrium with H 2 are H 2 O, CH 4 , NH 3 , and H 2 S and the assumptions on other atmospheric parameters (e.g., the eddy diffusion coefficient) remain broadly valid.
The eddy diffusion coefficient adopted in this work corresponds to that of Jupiter (Conrath & Gierasch 1984) and features a minimum at the bottom of the stratosphere. This minimum value is also close to the eddy diffusion coefficient at the tropospherestratosphere boundary of Earth's atmosphere (Massie & Hunten 1981). However, the adopted eddy diffusion coefficient at the bottom of the stratosphere is smaller than the values used in past photochemical models of warmer exoplanets (e.g., GJ 1214 b and GJ 436 b, Kempton et al. 2011;Hu & Seager 2014) or the values derived from a 3D particulate tracertransport model conditioned on hot Jupiters (Parmentier et al. 2013) by several orders of magnitude. We note that Earth, the cold giant planets in the Solar System, and the modeled K2-18 b Charnay et al. 2021) all have temperature inversion and thus a true stratosphere, while atmosphere models of the warm exoplanets GJ 1214 b and GJ 436 b do not predict temperature inversion (e.g., Kempton et al. 2011;. The lower temperature and the temperature inversion may both contribute to the lower eddy diffusion coefficient on temperate and cold exoplanets. Predictive models of the eddy diffusion coefficient in exoplanets are being developed (e.g., Zhang & Showman 2018a,b) and can be tested by future observations as shown in Figures 13-15.
We have also shown in Section 3 that the deeptropospheric source of CO, CO 2 , and N 2 and sink of NH 3 can substantially change the composition of the observable part of the atmosphere -and the transmission spectrum -if the atmosphere has 100×solar metallicity. The main change is the reduction of NH 3 and HCN and the enhancement of CO and CO 2 in the spectrum. As such, detecting and measuring the abundance of these gases in the temperate H 2 -dominated atmosphere may provide constraints on the temperature and the strength of vertical mixing in the deep troposphere (e.g., Fortney et al. 2020). One should note that modification of the deep-tropospheric abundance of gases by photochemical processes will be important in this endeavor: NH 3 is expected to be depleted anyway and CO 2 should overtake CO as the main carbon molecule in the middle atmosphere of temperate and H 2 -rich exoplanets of G/K stars.
A recently published study of atmospheric photochemistry in the atmosphere of K2-18 b (Yu et al. 2021) came to our notice during the peer-review phase of this work. The "no-surface" case in Yu et al. (2021) has a comparable physical picture as the 100×solar metallicity case with the deep-tropospheric source and sink presented in Figure 6. A common feature is that such an atmosphere would be rich in CO and CO 2 , and the difference in the profiles of HCN and other photochemical gases between the models may be due to the assumed profile of eddy diffusivity.
Lastly, we emphasize that several effects of potential importance have not been studied in this work. A more accurate pressure-temperature profile from 1D or 3D models may improve the prediction on the extent of water vapor depletion by condensation. A temperature inversion would result in higher temperatures in the upper stratosphere than what has been adopted here, and this may have an impact on the efficacy and relative importance of chemical pathways. A more accurate pressure-temperature profile and vertical mixing modeling for the deep troposphere may improve the prediction and perhaps remove the need for the endmember scenarios as presented. On planets that are expected to be tidally locked, the transmission spectra are controlled by the chemical abundance at the limb (e.g., Steinrueck et al. 2019;Drummond et al. 2020), and thus the horizontal transport of long-lived photochemical gases such as HCN and CO 2 may be important. Finally, we have not included hydrocarbon haze in this study, while it can form with both C 2 H 2 and HCN in the atmosphere (Kawashima et al. 2019). We hope that the present work will help motivate future studies to address these potential effects.

CONCLUSION
We have studied the photochemical mechanisms in temperate/cold and H 2 -rich exoplanets. For the H 2 -rich planets (giants and mini-Neptunes) that receive stellar irradiance of approximately Earth's, we find that the main photochemical gases are HCN and N 2 . The synthesis of HCN requires the photodissociation of NH 3 in presence of CH 4 at a temperature >∼ 200 K. NH 3 is dissociated near the water cloud deck and thus has a minimal mixing ratio in the middle atmosphere (10 -10 3 Pa) if the planet orbits a G/K star, but NH 3 can remain intact in the middle atmosphere if the planet orbits an M star. Additional photochemical gases include CO, CO 2 , C 2 H 6 , and C 2 H 2 . CO and CO 2 are the main photochemical gas of carbon because of the photodissociation of H 2 O together with CH 4 . The photodissociation of H 2 O also strongly limits the abundance of photochemical hydrocarbons in the atmosphere. For the planets that receive stellar irradiance of approximately 0.1× Earth's, the formation of HCN is limited by the low temperature, CO 2 or CO is not produced due to nearly complete removal of H 2 O by condensation, and the main photochemical gases are C 2 H 6 and C 2 H 2 .
The photochemical models of the temperate sub-Neptune K2-18 b assuming 1 − 100×solar abundance result in transmission spectra that fit the current measurements from K2, Hubble, and Spitzer. Both CH 4 and H 2 O contribute to the spectral modulation seen by Hubble. Transmission spectroscopy with JWST and ARIEL will likely provide the sensitivity to detect the equilibrium gases CH 4 , H 2 O, and NH 3 , the photochemical gas HCN, and in some cases CO 2 . C 2 H 6 is unlikely to be detectable due to its low mixing ratio and spectral feature overwhelmed by CH 4 . Transmission spectroscopy of the temperate giant planets around G/K stars will likely provide the sensitivity to detect CH 4 , H 2 O, and the photochemical gases HCN and CO 2 , complementing future spectroscopy in the reflected light by direct imaging. If the eddy diffusion coefficient is greater than that in Jupiter by two orders of magnitude, the sulfur haze layer would subdue the transmission spectral features -but this situation is unlikely for K2-18 b because of the detected spectral modulation. These results are also applicable to similarly irradiated H 2 -rich exoplanets, including TOI-1231 b and LHS-1140 b if they have H 2 -dominated atmospheres.
The results here indicate that the temperate/cold and H 2 -rich exoplanets, which often represent a temperature and atmospheric composition regime that is not found in the Solar System, likely have rich chemistry above clouds that leads to a potpourri of photochemical gases, some of which will build-up to the abundance detectable by transmission spectroscopy soon. The detection of atmospheric photochemical products in K2-18 b and other temperate exoplanets would expand the types of molecules detected in exoplanet atmospheres and greatly advance our understanding of the photochemical processes at works in low-temperature exoplanets.