# Identification of carbon dioxide in an exoplanet atmosphere

Eva-Maria Ahrer, Lili Alderson, Natalie Batalha, Natasha Batalha, Jacob Bean, Thomas Beatty, Taylor Bell, Björn Benneke, Zachory Berta-Thompson, Aarynn Carter, et al.

<figure><img src="image_1.png" /></figure>

► To cite this version:

Eva-Maria Ahrer, Lili Alderson, Natalie Batalha, Natasha Batalha, Jacob Bean, et al. Identification of carbon dioxide in an exoplanet atmosphere. Nature, 2022, 614 (7949), pp.649-652. 10.1038/s41586-022-05269-w. hal-04568713

HAL Id: hal-04568713

https://hal.science/hal-04568713

Submitted on 6 May 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
# Identification of carbon dioxide in an exoplanet atmosphere

https://doi.org/10.1038/s41586-022-05269-w

Received: 4 August 2022

Accepted: 23 August 2022

Published online: 2 September 2022

Open access

<figure><img src="image_1.png" /></figure>

Check for updates

JWST Transiting Exoplanet Community Early Release Science Team*

Carbon dioxide (CO₂) is a key chemical species that is found in a wide range of planetary atmospheres. In the context of exoplanets, CO₂ is an indicator of the metal enrichment (that is, elements heavier than helium, also called ‘metallicity’)¹⁻³, and thus the formation processes of the primary atmospheres of hot gas giants⁴⁻⁶. It is also one of the most promising species to detect in the secondary atmospheres of terrestrial exoplanets⁷⁻⁹. Previous photometric measurements of transiting planets with the Spitzer Space Telescope have given hints of the presence of CO₂, but have not yielded definitive detections owing to the lack of unambiguous spectroscopic identification¹⁰⁻¹². Here we present the detection of CO₂ in the atmosphere of the gas giant exoplanet WASP-39b from transmission spectroscopy observations obtained with JWST as part of the Early Release Science programme¹³,¹⁴. The data used in this study span 3.0–5.5 micrometres in wavelength and show a prominent CO₂ absorption feature at 4.3 micrometres (26-sigma significance). The overall spectrum is well matched by one-dimensional, ten-times solar metallicity models that assume radiative–convective–thermochemical equilibrium and have moderate cloud opacity. These models predict that the atmosphere should have water, carbon monoxide and hydrogen sulfide in addition to CO₂, but little methane. Furthermore, we also tentatively detect a small absorption feature near 4.0 micrometres that is not reproduced by these models.

WASP-39b is a hot (planetary equilibrium temperature of 1,170 K assuming zero albedo and full heat redistribution), transiting exoplanet that orbits a G7-type star with a period of 4.055 days¹⁵. The planet has approximately the same mass as Saturn (M = 0.28 M<sub>J</sub>, where M<sub>J</sub> is the mass of Jupiter) but is about 50% larger (radius R = 1.28 R<sub>J</sub>, where R<sub>J</sub> is the radius of Jupiter), probably owing to the high level of irradiation that it receives from its host star¹⁶⁻¹⁸. We chose this planet for the JWST Early Release Science (ERS) transmission spectroscopy observations because analyses of existing space- and ground-based data detected large spectral features and showed that there was minimal contamination of the planetary signal from stellar activity¹⁰,¹⁹⁻²¹. The main spectral features previously detected were confidently attributed to sodium, potassium and water vapour absorption¹⁰,¹⁹,²⁰, whereas carbon dioxide (CO₂) was suggested to explain the deep transit at 4.5 µm seen with Spitzer¹⁰.

Atmospheric metallicity has long been thought to be a diagnostic of the relative accretion of solids and gas during the formation of gas giant planets, both of which bring heavy elements to the hydrogen-dominated envelope and visible atmosphere⁴⁻⁶. The metallicity of WASP-39b's host star, which is a proxy for the metal enrichment of the protoplanetary disk that the planet formed in, is approximately solar¹⁵,²²⁻²⁴. Therefore, the planet mass–atmospheric metallicity trend observed in the Solar System giants²⁵,²⁶ predicts that it has an enhancement of about ten-times solar (like that of Saturn; ref. ²⁷). In addition, interior structure models that match WASP-39b's low density predict a 95th percentile upper limit for the atmospheric metallicity of 55-times solar, under

the limiting assumption that the planet has no heavy-element core and that all the metals are evenly distributed throughout the envelope²⁸.

Despite having some of the highest signal-to-noise detections of spectral features in its transmission spectrum, modelling of the existing data for WASP-39b has resulted in metallicity estimates ranging across five orders of magnitude, from 0.003-times solar to 300-times solar¹⁰,²⁹⁻³³. The wide range of values stems from the data being of insufficient quality to break the degeneracy between clouds and metallicity in transmission spectra models³⁴, as well as uncertainty over the interpretation of the photometric measurements by the Spitzer Space Telescope at 3.6 µm and 4.5 µm. Thus, spectroscopic data with greater precision, finer spectral channels and wider wavelength coverage were needed to better constrain the metallicity of this (and other) giant exoplanet atmospheres.

The first JWST ERS observation of WASP-39b was obtained using the Near Infrared Spectrograph (NIRSpec)³⁵,³⁶ on 10 July 2022, between 15:24 and 23:37 UTC. We used the Bright Object Time Series (BOTS) mode with the 1.6" × 1.6" fixed-slit aperture and the PRISM disperser to capture spectra between 0.5 µm and 5.5 µm. The data were recorded using the SUB512 subarray with five groups per integration and the NRSRAPID readout pattern, which gave integration times of 1.38 s. NIRSpec obtained a total of 21,500 integrations over 8.23 h of observations centred on the 2.8-h transit duration of WASP-39b.

The count rate in the PRISM mode varies significantly over the bandpass owing to the spectral energy distribution of the star and the wavelength dependency of the spectrograph dispersion. Therefore,

<footnote>*A list of authors and their affiliations appears at the end of the paper.</footnote>
# Identification of carbon dioxide in an exoplanet atmosphere

https://doi.org/10.1038/s41586-022-05269-w

Received: 4 August 2022

Accepted: 23 August 2022

Published online: 2 September 2022

Open access

<figure><img src="image_3.png" /></figure>

Check for updates

JWST Transiting Exoplanet Community Early Release Science Team*

Carbon dioxide (CO₂) is a key chemical species that is found in a wide range of planetary atmospheres. In the context of exoplanets, CO₂ is an indicator of the metal enrichment (that is, elements heavier than helium, also called ‘metallicity’)¹⁻³, and thus the formation processes of the primary atmospheres of hot gas giants⁴⁻⁶. It is also one of the most promising species to detect in the secondary atmospheres of terrestrial exoplanets⁷⁻⁹. Previous photometric measurements of transiting planets with the Spitzer Space Telescope have given hints of the presence of CO₂, but have not yielded definitive detections owing to the lack of unambiguous spectroscopic identification¹⁰⁻¹². Here we present the detection of CO₂ in the atmosphere of the gas giant exoplanet WASP-39b from transmission spectroscopy observations obtained with JWST as part of the Early Release Science programme¹³,¹⁴. The data used in this study span 3.0–5.5 micrometres in wavelength and show a prominent CO₂ absorption feature at 4.3 micrometres (26-sigma significance). The overall spectrum is well matched by one-dimensional, ten-times solar metallicity models that assume radiative–convective–thermochemical equilibrium and have moderate cloud opacity. These models predict that the atmosphere should have water, carbon monoxide and hydrogen sulfide in addition to CO₂, but little methane. Furthermore, we also tentatively detect a small absorption feature near 4.0 micrometres that is not reproduced by these models.

WASP-39b is a hot (planetary equilibrium temperature of 1,170 K assuming zero albedo and full heat redistribution), transiting exoplanet that orbits a G7-type star with a period of 4.055 days¹⁵. The planet has approximately the same mass as Saturn (M = 0.28 M<sub>J</sub>, where M<sub>J</sub> is the mass of Jupiter) but is about 50% larger (radius R = 1.28 R<sub>J</sub>, where R<sub>J</sub> is the radius of Jupiter), probably owing to the high level of irradiation that it receives from its host star¹⁶⁻¹⁸. We chose this planet for the JWST Early Release Science (ERS) transmission spectroscopy observations because analyses of existing space- and ground-based data detected large spectral features and showed that there was minimal contamination of the planetary signal from stellar activity¹⁰,¹⁹⁻²¹. The main spectral features previously detected were confidently attributed to sodium, potassium and water vapour absorption¹⁰,¹⁹,²⁰, whereas carbon dioxide (CO₂) was suggested to explain the deep transit at 4.5 µm seen with Spitzer¹⁰.

Atmospheric metallicity has long been thought to be a diagnostic of the relative accretion of solids and gas during the formation of gas giant planets, both of which bring heavy elements to the hydrogen-dominated envelope and visible atmosphere⁴⁻⁶. The metallicity of WASP-39b's host star, which is a proxy for the metal enrichment of the protoplanetary disk that the planet formed in, is approximately solar¹⁵,²²⁻²⁴. Therefore, the planet mass–atmospheric metallicity trend observed in the Solar System giants²⁵,²⁶ predicts that it has an enhancement of about ten-times solar (like that of Saturn; ref. ²⁷). In addition, interior structure models that match WASP-39b's low density predict a 95th percentile upper limit for the atmospheric metallicity of 55-times solar, under

the limiting assumption that the planet has no heavy-element core and that all the metals are evenly distributed throughout the envelope²⁸.

Despite having some of the highest signal-to-noise detections of spectral features in its transmission spectrum, modelling of the existing data for WASP-39b has resulted in metallicity estimates ranging across five orders of magnitude, from 0.003-times solar to 300-times solar¹⁰,²⁹⁻³³. The wide range of values stems from the data being of insufficient quality to break the degeneracy between clouds and metallicity in transmission spectra models³⁴, as well as uncertainty over the interpretation of the photometric measurements by the Spitzer Space Telescope at 3.6 µm and 4.5 µm. Thus, spectroscopic data with greater precision, finer spectral channels and wider wavelength coverage were needed to better constrain the metallicity of this (and other) giant exoplanet atmospheres.

The first JWST ERS observation of WASP-39b was obtained using the Near Infrared Spectrograph (NIRSpec)³⁵,³⁶ on 10 July 2022, between 15:24 and 23:37 UTC. We used the Bright Object Time Series (BOTS) mode with the 1.6" × 1.6" fixed-slit aperture and the PRISM disperser to capture spectra between 0.5 µm and 5.5 µm. The data were recorded using the SUB512 subarray with five groups per integration and the NRSRAPID readout pattern, which gave integration times of 1.38 s. NIRSpec obtained a total of 21,500 integrations over 8.23 h of observations centred on the 2.8-h transit duration of WASP-39b.

The count rate in the PRISM mode varies significantly over the bandpass owing to the spectral energy distribution of the star and the wavelength dependency of the spectrograph dispersion. Therefore,

<footnote>*A list of authors and their affiliations appears at the end of the paper.</footnote>
<figure><img src="image_2.png" /></figure>

**Fig. 1 | JWST NIRSpec time-series data for WASP-39b.** *a*, Spectroscopic light curves for WASP-39b's transit with a spectral resolving power of 20 and a time cadence of 1 min (data are binned and offset vertically for display purposes only). An exoplanet light-curve model was fitted to the data using a quadratic limb-darkening law with an exponential ramp and a quadratic function of time removed. *b*, Residuals of the binned light curve after subtracting the transit model scaled up by a factor of five to show the structure. The r.m.s. of the residuals are given in units of ppm. The numbers in brackets are the ratio of the r.m.s. to the predicted photon-limited noise.

the observations were designed to saturate at shorter wavelengths in order to obtain sufficient signal-to-noise ratio at the longer wavelengths in the bandpass that have not previously been studied spectroscopically. Wavelengths between 0.71 µm and 2.09 µm have at least one group saturated in the pixel at the centre of the spectral trace. We concentrate here on the analysis of the data longwards of 3.0 µm that are not impacted by saturation to investigate the spectrum overlapping with the previous 3.6 µm and 4.5 µm Spitzer photometric measurements. The subset of the PRISM data described herein has a native spectral resolving power ($R = \lambda/\Delta\lambda$, where $\lambda$ is wavelength) of 100–350. For this study, we binned the data to lower resolving powers (values range from 60 to 200 depending on wavelength and reduction). The binning is done at the light-curve level before the fitting of the transit depths that constitute the transmission spectrum. Analyses of JWST/NIRSpec

transit observations obtained during commissioning have shown that similar levels of binning as we use here results in minimal systematics³⁷. An analysis of the complete PRISM dataset at full resolution, including recovery of the saturated part of the spectrum, is ongoing.

We reduced the NIRSpec PRISM data for WASP-39b using the JWST Science Calibration Pipeline along with customized routines to minimize noise in the time-series spectra (Methods). We performed four different reductions of the transmission spectrum starting from the uncalibrated data²¹,³⁸⁻⁴⁰. Figure 1 shows derived spectroscopic transit light curves from one of the reductions. We confirm with our analysis of the WASP-39b data that NIRSpec transit observations at a resolving power of 60–200 are nearly free of systematics. We achieved close to photon-noise-limited measurements in the spectroscopic light curves after trimming the first 10 min of data and removing a linear trend in time with an average rate of about 190 ppm h⁻¹ across the bandpass. We also obtained similar results by fitting the full time series with a downwards trending exponential ramp (timescale about 100 min) combined with a quadratic function of time. The lack of large systematics in these data stands in contrast to previous transit spectroscopy observations with space- or ground-based telescopes⁴¹.

The transmission spectra derived from the different reductions, shown in Fig. 2, have excellent agreement. They all show a large feature at 4.3 µm, as well as a smaller feature near 4.0 µm (discussed below). Detailed modelling of the Fast InfraRed Exoplanet Fitting Lyhtcurve (FIREFLy)-reduced data yields a statistical significance of 26σ for the large feature (Methods). We attribute this feature to CO₂ absorption based on a comparison of the resolved band shape with theoretical models and the spectra of brown dwarfs⁴². Figure 2 also includes Spitzer's two broadband photometric measurements¹⁰, which are consistent with the JWST data to better than 2σ after integrating the transmission spectrum over the Spitzer bandpasses. We also see good agreement (better than 2σ for all reductions) in the relative transit depths between the 3.6-µm and 4.5-µm channels. The comparison shown in Fig. 2 demonstrates both the consistency in the derived spectra from multiple, independent analyses and the reliability of the previous Spitzer measurements.

We compared the data with a suite of one-dimensional atmospheric structure and transmission spectrum models to constrain the composition of WASP-39b's atmosphere. These models assume radiative-convective-thermochemical equilibrium, and they adopt a scaled

<figure><img src="image_3.png" /><figcaption>**Fig. 2 | Independent reductions of the WASP-39b transmission spectrum.**</figcaption></figure>

The JWST data (small coloured points) are compared with Spitzer's two Infrared Array Camera (IRAC) broadband photometric measurements (grey circles and corresponding sensitivity curves labelled IRAC1 and IRAC2). The axis on the right shows equivalent scale heights (750–1,000 km) in WASP-39b's atmosphere; for plotting purposes, we assume that one scale height corresponds to 800 km. The JWST data are consistent with the Spitzer points (within 2σ) when integrated over the broad bandpasses (indicated by the horizontal lines). The relative transit depths between the 3.6-µm and 4.5-µm channels are also consistent within 2σ between independent reductions of the JWST data, with most of the deviation coming from the 3.6-µm bandpass. Vertical error bars indicate 1σ uncertainties.
<figure><img src="image_4.png" /></figure>

<figure><img src="image_5.png" /><figcaption>**Fig. 1 | JWST NIRSpec time-series data for WASP-39b.** *a*, Spectroscopic light curves for WASP-39b's transit with a spectral resolving power of 20 and a time cadence of 1 min (data are binned and offset vertically for display purposes only). An exoplanet light-curve model was fitted to the data using a quadratic limb-darkening law with an exponential ramp and a quadratic function of time removed. *b*, Residuals of the binned light curve after subtracting the transit model scaled up by a factor of five to show the structure. The r.m.s. of the residuals are given in units of ppm. The numbers in brackets are the ratio of the r.m.s. to the predicted photon-limited noise.</figcaption></figure>

the observations were designed to saturate at shorter wavelengths in order to obtain sufficient signal-to-noise ratio at the longer wavelengths in the bandpass that have not previously been studied spectroscopically. Wavelengths between 0.71 µm and 2.09 µm have at least one group saturated in the pixel at the centre of the spectral trace. We concentrate here on the analysis of the data longwards of 3.0 µm that are not impacted by saturation to investigate the spectrum overlapping with the previous 3.6 µm and 4.5 µm Spitzer photometric measurements. The subset of the PRISM data described herein has a native spectral resolving power ($R = \lambda/\Delta\lambda$, where $\lambda$ is wavelength) of 100–350. For this study, we binned the data to lower resolving powers (values range from 60 to 200 depending on wavelength and reduction). The binning is done at the light-curve level before the fitting of the transit depths that constitute the transmission spectrum. Analyses of JWST/NIRSpec

transit observations obtained during commissioning have shown that similar levels of binning as we use here results in minimal systematics³⁷. An analysis of the complete PRISM dataset at full resolution, including recovery of the saturated part of the spectrum, is ongoing.

We reduced the NIRSpec PRISM data for WASP-39b using the JWST Science Calibration Pipeline along with customized routines to minimize noise in the time-series spectra (Methods). We performed four different reductions of the transmission spectrum starting from the uncalibrated data²¹,³⁸⁻⁴⁰. Figure 1 shows derived spectroscopic transit light curves from one of the reductions. We confirm with our analysis of the WASP-39b data that NIRSpec transit observations at a resolving power of 60–200 are nearly free of systematics. We achieved close to photon-noise-limited measurements in the spectroscopic light curves after trimming the first 10 min of data and removing a linear trend in time with an average rate of about 190 ppm h⁻¹ across the bandpass. We also obtained similar results by fitting the full time series with a downwards trending exponential ramp (timescale about 100 min) combined with a quadratic function of time. The lack of large systematics in these data stands in contrast to previous transit spectroscopy observations with space- or ground-based telescopes⁴¹.

The transmission spectra derived from the different reductions, shown in Fig. 2, have excellent agreement. They all show a large feature at 4.3 µm, as well as a smaller feature near 4.0 µm (discussed below). Detailed modelling of the Fast InfraRed Exoplanet Fitting Lyhtcurve (FIREFLy)-reduced data yields a statistical significance of 26σ for the large feature (Methods). We attribute this feature to CO₂ absorption based on a comparison of the resolved band shape with theoretical models and the spectra of brown dwarfs⁴². Figure 2 also includes Spitzer's two broadband photometric measurements¹⁰, which are consistent with the JWST data to better than 2σ after integrating the transmission spectrum over the Spitzer bandpasses. We also see good agreement (better than 2σ for all reductions) in the relative transit depths between the 3.6-µm and 4.5-µm channels. The comparison shown in Fig. 2 demonstrates both the consistency in the derived spectra from multiple, independent analyses and the reliability of the previous Spitzer measurements.

We compared the data with a suite of one-dimensional atmospheric structure and transmission spectrum models to constrain the composition of WASP-39b's atmosphere. These models assume radiative-convective-thermochemical equilibrium, and they adopt a scaled

<figure><img src="image_6.png" /><figcaption>**Fig. 2 | Independent reductions of the WASP-39b transmission spectrum.**</figcaption></figure>

The JWST data (small coloured points) are compared with Spitzer's two Infrared Array Camera (IRAC) broadband photometric measurements (grey circles and corresponding sensitivity curves labelled IRAC1 and IRAC2). The axis on the right shows equivalent scale heights (750–1,000 km) in WASP-39b's atmosphere; for plotting purposes, we assume that one scale height corresponds to 800 km. The JWST data are consistent with the Spitzer points (within 2σ) when integrated over the broad bandpasses (indicated by the horizontal lines). The relative transit depths between the 3.6-µm and 4.5-µm channels are also consistent within 2σ between independent reductions of the JWST data, with most of the deviation coming from the 3.6-µm bandpass. Vertical error bars indicate 1σ uncertainties.
<figure><img src="image_4.png" /><figcaption>**Fig. 3 | Interpretation of WASP-39b's transmission spectrum.** Top: a comparison of the FIREFLy reduction and its $\iota\sigma$ uncertainties (labelled 'Data') to the best-fit ScCHIMERA theoretical model binned to the resolution of the data (blue curve; Methods). The key parameters of the model are 10-times solar metallicity, a carbon-to-oxygen ratio of 0.35 and cloud opacity of $7 \times 10^{-3} \text{ cm}^2\text{g}^{-1}$. The impact of the opacity sources expected from thermochemical equilibrium over the full bandpass are indicated by removing the opacity contribution from individual gases one at a time. As in Fig. 2, the axis on the right shows equivalent scale heights in WASP-39b's atmosphere. Bottom: the molecular absorption cross-sections for each gas in the best-fit model. The model is well matched to the data ($X^2/N_{\text{data}} = 1.3$), suggesting that our assumptions broadly capture the important physics and chemistry in WASP-39b's atmosphere. However, there is a feature near 4.0 µm that cannot be reproduced by the models used here. The strong CO$_2$ absorption (4.1–4.6 µm) and the apparent lack of methane (3.0–3.5 µm) is what drives the solution to an elevated atmospheric metal enrichment, ruling out previous low-metallicity estimates$^{29–31}$. The other reductions and models give similar results.</figcaption></figure>

solar abundance pattern. We calculated planet-specific grids of these models over a range of atmospheric metallicities, carbon-to-oxygen ratios and cloud properties using four different codes. These grids of self-consistent model transmission spectra were then fitted to the FIREFLy-reduced data (the fit results are independent of which dataset we use) while also adjusting for a reference radius at 1 bar. The results are illustrated in Fig. 3; see Methods for further details.

Under similar assumptions, all four model grids are able to match the dominant spectral morphologies—namely the strong CO$_2$ feature between 4.1 µm and 4.6 µm and the rise in transit depth bluewards of 3.6 µm owing to water (H$_2$O) vapour (a species that had been detected previously at shorter wavelengths$^{10}$). More subtle modulations over the whole bandpass are potentially owing to contributions from clouds, carbon monoxide (CO) and hydrogen sulfide (H$_2$S), although the degree to which the two gas species contribute is unknown pending further study.

Several models for warm gas giant atmospheres predict that the CO$_2$ abundance scales quadratically with atmospheric metallicity, becoming detectable at 4.3 µm for metallicities above that of the Sun$^{-1}$. The representative best-fit model shown in Fig. 3 is consistent with this scenario. It has a 10-times-solar metal enrichment and a slightly subsolar carbon-to-oxygen ratio (0.35, compared with the solar value of 0.55; ref. $^{43}$). The moderate contribution of cloud opacity predicted by the best-fit model is consistent with interpretations of previous population-level studies of planets that have similar temperatures and gravities to WASP-39b$^{44,45}$. It is also consistent with the predictions of aerosol microphysics and global circulation models of hot giant planets$^{46–48}$.

In addition to the large CO$_2$ feature, we also identify a smaller spectral feature near 4.0 µm that is not matched by our thermochemical equilibrium models (Fig. 3). This feature is present in all four independent reductions and has a significance of $2\sigma$ (Methods). Further data analysis and modelling including non-equilibrium chemistry are needed to fully assess the robustness of this feature and to identify the chemical species that gives rise to it. Additional JWST ERS observations

of WASP-39b that will use the G395H grating on NIRSpec also have the potential to confirm the 4.0-µm feature and resolve it in greater detail.

The grid fits explored here favour lower metallicities than refs. $^{10,21}$, and higher metallicities than ref. $^{31}$, even though the Spitzer data that their studies included are consistent with our JWST data. The higher precision and more resolved measurement of the CO$_2$ feature enabled by JWST pulls the models of refs. $^{10,21}$ to lower metallicity and increased cloudiness. Nevertheless, it is not possible to obtain a robust confidence interval on this inference without more rigorous Bayesian analyses, which is left to future work (Methods). Continued modeling of WASP-39b will also be aided by the future measurements of the planet's transmission spectrum from 0.5 µm to 5.5 µm that are also being obtained by this ERS programme. The final transmission spectrum will ultimately have higher spectral resolution than the data presented here (more than four times over most of the bandpass), and will be validated using multiple JWST instruments.

## Online content

Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41586-022-05269-w.

1. Lodders, K. & Fegley, B. Atmospheric chemistry in giant planets, brown dwarfs, and low-mass dwarf stars. I. Carbon, nitrogen, and oxygen. *Icarus* **155**, 393–424 (2002).

2. Zahnle, K., Marley, M. S., Freedman, R. S., Lodders, K. & Fortney, J. J. Atmospheric sulfur photochemistry on hot Jupiters. *Astrophys. J. Lett.* **701**, L20–L24 (2009).

3. Moses, J. I. et al. Compositional diversity in the atmospheres of hot Neptunes, with application to GJ 436b. *Astrophys. J.* **777**, 34 (2013).

4. Pollack, J. B. et al. Formation of the giant planets by concurrent accretion of solids and gas. *Icarus* **124**, 62–85 (1996).

5. Fortney, J. J. et al. A framework for characterizing the atmospheres of low-mass low-density transiting planets. *Astrophys. J.* **775**, 80 (2013).

6. Venturini, J., Alibert, Y. & Benz, W. Planet formation with envelope enrichment: new insights on planetary diversity. *Astron. Astrophys.* **596**, A90 (2016).

7. Kaltenegger, L. & Traub, W. A. Transits of Earth-like planets. *Astrophys. J.* **698**, 519–527 (2009).

8. Deming, D. et al. Discovery and characterization of transiting super Earths using an all-sky transit survey and follow-up by the James Webb Space Telescope. *Publ. Astron. Soc. Pac.* **121**, 952–967 (2009).

9. Lustig-Yaeger, J., Meadows, V. S. & Lincowski, A. P. The detectability and characterization of the TRAPPIST-1 exoplanet atmospheres with JWST. *Astron. J.* **158**, 27 (2019).

10. Wakeford, H. R. et al. The complete transmission spectrum of WASP-39b with a precise water constraint. *Astron. J.* **155**, 29 (2018).

11. Spake, J. J. et al. Abundance measurements of H$_2$O and carbon-bearing species in the atmosphere of WASP-127b confirm its supersolar metallicity. *Mon. Not. R. Astron. Soc.* **500**, 4042–4064 (2021).

12. Alderson, L. et al. A comprehensive analysis of WASP-17b's transmission spectrum from space-based observations. *Mon. Not. R. Astron. Soc.* **512**, 4185–4209 (2022).

13. Stevenson, K. B. et al. Transiting exoplanet studies and community targets for JWST's Early Release Science Program. *Publ. Astron. Soc. Pac.* **128**, 094401 (2016).

14. Bean, J. L. et al. The Transiting Exoplanet Community Early Release Science Program for JWST. *Publ. Astron. Soc. Pac.* **130**, 114402 (2018).

15. Faedi, F. et al. WASP-39b: a highly inflated Saturn-mass planet orbiting a late G-type star. *Astron. Astrophys.* **531**, A40 (2011).

16. Laughlin, G., Crismani, M. & Adams, F. C. On the anomalous radii of the transiting extrasolar planets. *Astrophys. J. Lett.* **729**, L7 (2011).

17. Thorngren, D. P. & Fortney, J. J. Bayesian analysis of hot-Jupiter radius anomalies: evidence for ohmic dissipation? *Astron. J.* **155**, 214 (2018).

18. Sarkis, P., Mordasini, C., Henning, T., Marleau, G. D. & Mollière, P. Evidence of three mechanisms explaining the radius anomaly of hot Jupiters. *Astron. Astrophys.* **645**, A79 (2021).

19. Fischer, P. D. et al. HST hot-Jupiter transmission spectral survey: clear skies for cool Saturn WASP-39b. *Astrophys. J.* **827**, 19 (2016).

20. Nikolov, N. et al. VLT FORS2 comparative transmission spectroscopy: detection of Na in the atmosphere of WASP-39b from the ground. *Astrophys. J.* **832**, 191 (2016).

21. Kirk, J. et al. LRG-BEASTS: transmission spectroscopy and retrieval analysis of the highly inflated Saturn-mass planet WASP-39b. *Astron. J.* **158**, 144 (2019).

22. Mancini, L. et al. The GAPS programme with HARPS-N at TNG. XVI. Measurement of the Rossier–McLaughlin effect of transiting planetary systems HAT-P-3, HAT-P-12, HAT-P-22, WASP-39, and WASP-60. *Astron. Astrophys.* **613**, A41 (2018).

23. Biazzo, K. et al. The GAPS programme with HARPS-N at TNG. XXXV. Fundamental properties of transiting exoplanet host stars. *Astron. Astrophys.* **664**, A61 (2022).

24. Polanski, A. S., Crossfield, I. J. M., Howard, A. W., Isaacson, H. & Rice, M. Chemical abundances for 25 JWST exoplanet host stars with KeckSpec. Res. Note. AAS **6**, 155 (2022).
<figure><img src="image_7.png" /><figcaption>**Fig. 3 | Interpretation of WASP-39b's transmission spectrum.** Top: a comparison of the FIREFLy reduction and its $\iota\sigma$ uncertainties (labelled 'Data') to the best-fit ScCHIMERA theoretical model binned to the resolution of the data (blue curve; Methods). The key parameters of the model are 10-times solar metallicity, a carbon-to-oxygen ratio of 0.35 and cloud opacity of $7 \times 10^{-3} \text{ cm}^2\text{g}^{-1}$. The impact of the opacity sources expected from thermochemical equilibrium over the full bandpass are indicated by removing the opacity contribution from individual gases one at a time. As in Fig. 2, the axis on the right shows equivalent scale heights in WASP-39b's atmosphere. Bottom: the molecular absorption cross-sections for each gas in the best-fit model. The model is well matched to the data ($X^2/N_{\text{data}} = 1.3$), suggesting that our assumptions broadly capture the important physics and chemistry in WASP-39b's atmosphere. However, there is a feature near 4.0 µm that cannot be reproduced by the models used here. The strong CO$_2$ absorption (4.1–4.6 µm) and the apparent lack of methane (3.0–3.5 µm) is what drives the solution to an elevated atmospheric metal enrichment, ruling out previous low-metallicity estimates$^{29–31}$. The other reductions and models give similar results.</figcaption></figure>

solar abundance pattern. We calculated planet-specific grids of these models over a range of atmospheric metallicities, carbon-to-oxygen ratios and cloud properties using four different codes. These grids of self-consistent model transmission spectra were then fitted to the FIREFLy-reduced data (the fit results are independent of which dataset we use) while also adjusting for a reference radius at 1 bar. The results are illustrated in Fig. 3; see Methods for further details.

Under similar assumptions, all four model grids are able to match the dominant spectral morphologies—namely the strong CO$_2$ feature between 4.1 µm and 4.6 µm and the rise in transit depth bluewards of 3.6 µm owing to water (H$_2$O) vapour (a species that had been detected previously at shorter wavelengths$^{10}$). More subtle modulations over the whole bandpass are potentially owing to contributions from clouds, carbon monoxide (CO) and hydrogen sulfide (H$_2$S), although the degree to which the two gas species contribute is unknown pending further study.

Several models for warm gas giant atmospheres predict that the CO$_2$ abundance scales quadratically with atmospheric metallicity, becoming detectable at 4.3 µm for metallicities above that of the Sun$^{-1}$. The representative best-fit model shown in Fig. 3 is consistent with this scenario. It has a 10-times-solar metal enrichment and a slightly sub-solar carbon-to-oxygen ratio (0.35, compared with the solar value of 0.55; ref. $^{43}$). The moderate contribution of cloud opacity predicted by the best-fit model is consistent with interpretations of previous population-level studies of planets that have similar temperatures and gravities to WASP-39b$^{44,45}$. It is also consistent with the predictions of aerosol microphysics and global circulation models of hot giant planets$^{46–48}$.

In addition to the large CO$_2$ feature, we also identify a smaller spectral feature near 4.0 µm that is not matched by our thermochemical equilibrium models (Fig. 3). This feature is present in all four independent reductions and has a significance of $2\sigma$ (Methods). Further data analysis and modelling including non-equilibrium chemistry are needed to fully assess the robustness of this feature and to identify the chemical species that gives rise to it. Additional JWST ERS observations

of WASP-39b that will use the G395H grating on NIRSpec also have the potential to confirm the 4.0-µm feature and resolve it in greater detail.

The grid fits explored here favour lower metallicities than refs. $^{10,21}$, and higher metallicities than ref. $^{31}$, even though the Spitzer data that their studies included are consistent with our JWST data. The higher precision and more resolved measurement of the CO$_2$ feature enabled by JWST pulls the models of refs. $^{10,21}$ to lower metallicity and increased cloudiness. Nevertheless, it is not possible to obtain a robust confidence interval on this inference without more rigorous Bayesian analyses, which is left to future work (Methods). Continued modeling of WASP-39b will also be aided by the future measurements of the planet's transmission spectrum from 0.5 µm to 5.5 µm that are also being obtained by this ERS programme. The final transmission spectrum will ultimately have higher spectral resolution than the data presented here (more than four times over most of the bandpass), and will be validated using multiple JWST instruments.

## Online content

Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/s41586-022-05269-w.

1. Lodders, K. & Fegley, B. Atmospheric chemistry in giant planets, brown dwarfs, and low-mass dwarf stars. I. Carbon, nitrogen, and oxygen. *Icarus* **155**, 393–424 (2002).

2. Zahnle, K., Marley, M. S., Freedman, R. S., Lodders, K. & Fortney, J. J. Atmospheric sulfur photochemistry on hot Jupiters. *Astrophys. J. Lett.* **701**, L20–L24 (2009).

3. Moses, J. I. et al. Compositional diversity in the atmospheres of hot Neptunes, with application to GJ 436b. *Astrophys. J.* **777**, 34 (2013).

4. Pollack, J. B. et al. Formation of the giant planets by concurrent accretion of solids and gas. *Icarus* **124**, 62–85 (1996).

5. Fortney, J. J. et al. A framework for characterizing the atmospheres of low-mass low-density transiting planets. *Astrophys. J.* **775**, 80 (2013).

6. Venturini, J., Alibert, Y. & Benz, W. Planet formation with envelope enrichment: new insights on planetary diversity. *Astron. Astrophys.* **596**, A90 (2016).

7. Kaltenegger, L. & Traub, W. A. Transits of Earth-like planets. *Astrophys. J.* **698**, 519–527 (2009).

8. Deming, D. et al. Discovery and characterization of transiting super Earths using an all-sky transit survey and follow-up by the James Webb Space Telescope. *Publ. Astron. Soc. Pac.* **121**, 952–967 (2009).

9. Lustig-Yaeger, J., Meadows, V. S. & Lincowski, A. P. The detectability and characterization of the TRAPPIST-1 exoplanet atmospheres with JWST. *Astron. J.* **158**, 27 (2019).

10. Wakeford, H. R. et al. The complete transmission spectrum of WASP-39b with a precise water constraint. *Astron. J.* **155**, 29 (2018).

11. Spake, J. J. et al. Abundance measurements of H$_2$O and carbon-bearing species in the atmosphere of WASP-127b confirm its supersolar metallicity. *Mon. Not. R. Astron. Soc.* **500**, 4042–4064 (2021).

12. Alderson, L. et al. A comprehensive analysis of WASP-17b's transmission spectrum from space-based observations. *Mon. Not. R. Astron. Soc.* **512**, 4185–4209 (2022).

13. Stevenson, K. B. et al. Transiting exoplanet studies and community targets for JWST's Early Release Science Program. *Publ. Astron. Soc. Pac.* **128**, 094401 (2016).

14. Bean, J. L. et al. The Transiting Exoplanet Community Early Release Science Program for JWST. *Publ. Astron. Soc. Pac.* **130**, 114402 (2018).

15. Faedi, F. et al. WASP-39b: a highly inflated Saturn-mass planet orbiting a late G-type star. *Astron. Astrophys.* **531**, A40 (2011).

16. Laughlin, G., Crismani, M. & Adams, F. C. On the anomalous radii of the transiting extrasolar planets. *Astrophys. J. Lett.* **729**, L7 (2011).

17. Thorngren, D. P. & Fortney, J. J. Bayesian analysis of hot-Jupiter radius anomalies: evidence for ohmic dissipation? *Astron. J.* **155**, 214 (2018).

18. Sarkis, P., Mordasini, C., Henning, T., Marleau, G. D. & Mollière, P. Evidence of three mechanisms explaining the radius anomaly of hot Jupiters. *Astron. Astrophys.* **645**, A79 (2021).

19. Fischer, P. D. et al. HST hot-Jupiter transmission spectral survey: clear skies for cool Saturn WASP-39b. *Astrophys. J.* **827**, 19 (2016).

20. Nikolov, N. et al. VLT FORS2 comparative transmission spectroscopy: detection of Na in the atmosphere of WASP-39b from the ground. *Astrophys. J.* **832**, 191 (2016).

21. Kirk, J. et al. LRG-BEASTS: transmission spectroscopy and retrieval analysis of the highly inflated Saturn-mass planet WASP-39b. *Astron. J.* **158**, 144 (2019).

22. Mancini, L. et al. The GAPS programme with HARPS-N at TNG. XVI. Measurement of the Rossier–McLaughlin effect of transiting planetary systems HAT-P-3, HAT-P-12, HAT-P-22, WASP-39, and WASP-60. *Astron. Astrophys.* **613**, A41 (2018).

23. Biazzo, K. et al. The GAPS programme with HARPS-N at TNG. XXXV. Fundamental properties of transiting exoplanet host stars. *Astron. Astrophys.* **664**, A61 (2022).

24. Polanski, A. S., Crossfield, I. J. M., Howard, A. W., Isaacson, H. & Rice, M. Chemical abundances for 25 JWST exoplanet host stars with KeckSpec. Res. Note. AAS **6**, 155 (2022).
25. Lodders K. & Fogley B. *The Planetary Scientist's Companion* (Oxford Univ. Press, 1998).

26. Kreidberg, L. et al. A precise water abundance measurement for the hot Jupiter WASP-43b. *Astrophys. J. Lett.* **793**, L27 (2014).

27. Atreya, S. K. et al. The origin and evolution of Saturn: a post-Cassini perspective. Preprint at https://arxiv.org/abs/2205.06914 (2022).

28. Thorngren, D. & Fortney, J. J. Connecting giant planet atmosphere and interior modeling: constraints on atmospheric metal enrichment. *Astrophys. J. Lett.* **874**, L31 (2019).

29. Tsiaras, A. et al. A population study of gaseous exoplanets. *Astron.* **J. 155**, 156 (2018).

30. Fisher, C. & Heng, J. Retrieval study of 38 WFC3 transmission spectra and resolution of the normalization degeneracy. *Mon. Not. R. Astron. Soc.* **481**, 4698–4727 (2018).

31. Pinhas, A., Madhusudhan, N., Gandhi, S. & MacDonald, R. H₂O abundances and cloud properties in ten hot giant exoplanets. *Mon. Not. R. Astron. Soc.* **482**, 1485–1498 (2019).

32. Welbanks, L. et al. Mass-metallicity trends in transiting exoplanets from atmospheric abundances of H₂O, Na, and K. *Astrophys. J. Lett.* **887**, L20 (2019).

33. Min, M., Ormel, C. W., Chubb, K., Helling, C. & Kawashima, Y. The ARCIS framework for exoplanet atmospheres. Modelling philosophy and retrieval. *Astron. Astrophys.* **642**, A28 (2020).

34. Benneke, B. & Seager, S. How to distinguish between cloudy mini-Neptunes and water/volatile-dominated super-Earths. *Astrophys. J.* **778**, 153 (2013).

35. Jakobsen, P. et al. The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. I. Overview of the instrument and its capabilities. *Astron. Astrophys.* **661**, A80 (2022).

36. Birkmann, S. M. et al. The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. IV. Capabilities and predicted performance for exoplanet characterization. *Astron. Astrophys.* **661**, A83 (2022).

37. Rigby, J. et al. Characterization of JWST science performance from commissioning. Preprint at https://arxiv.org/abs/2207.05632 (2022).

38. Rustamkulov, Z., Sing, D. K., Liu, R. & Wang, A. Analysis of a JWST NIRSpec lab time series: characterizing systematics, recovering exoplanet transit spectroscopy, and constraining a noise floor. *Astrophys. J. Lett.* **928**, L7 (2022).

39. Bell, T. J. et al. Eurekal: an end-to-end pipeline for JWST time-series observations. *J. Open Source Sci.* **7**, 4503–4508 (2022).

40. Glidic, K. et al. Atmospheric characterization of hot Jupiter CoRoT-1b using the Wide Field Camera 3 on the Hubble Space Telescope. *Astron.* **J. 164**, 19 (2022).

41. Beichman, C. et al. Observations of transiting exoplanets with the James Webb Space Telescope (JWST). *Publ. Astron. Soc. Pac.* **126**, 1134–1173 (2014).

42. Yamamura, I., Tsuji, T. & Tanabé, T. *AKARI observations of brown dwarfs*. I. CO and CO₂ bands in the near-infrared spectra. *Astrophys. J.* **722**, 682–698 (2010).

43. Lodders, K., Palme, H. & Gail, H.-P. in *Solar System: Astronomy, Astrophysics, and Cosmology Vol. 4B* (ed. Trümper, J. E.) 712 (Landolt-Börnstein - Group VI 'Astronomy and Astrophysics', Springer, 2009).

44. Stevenson, K. B. Quantifying and predicting the presence of clouds in exoplanet atmospheres. *Astrophys. J. Lett.* **817**, L16 (2016).

45. Fu, G. et al. Statistical analysis of Hubble/WFC3 transit spectroscopy of extrasolar planets. *Astrophys. J. Lett.* **847**, L22 (2017).

46. Parmentier, V., Fortney, J. J., Showman, A. P., Morley, C. & Marley, M. S. Transitions in the cloud composition of hot Jupiters. *Astrophys. J.* **828**, 22 (2016).

47. Kataria, T. et al. The atmospheric circulation of a nine-hot-Jupiter sample: probing chemistry and chemistry over a wide phase space. *Astrophys. J.* **821**, 9 (2016).

48. Gao, P. et al. Aerosol composition of hot giant exoplanets dominated by silicates and hydrocarbon hazes. *Nat. Astron.* **4**, 951–956 (2020).

Nikolay K. Nikolov¹², D. J. M. Petit dit de la Roche³⁸, Michael Radica⁹, Pierre-Alexis Roy⁹, Keivan G. Stassun⁴⁴, Jake Taylor⁹, William C. Waalkes¹⁰, Patcharapol Wachiraphan¹⁰, Luis Welbanks¹⁹, Peter J. Wheatley¹², Keshav Aggarwal⁴⁵, Munazza K. Alam³³, Agnibha Banerjee⁴⁶, Joanna K. Barstow⁴⁶, Jasmina Blecic⁴⁷, S. L. Casewell⁴⁸, Quentin Changeat⁴⁹, K. L. Chubb⁵⁰, Knicole D. Colón⁵¹, Louis-Philipp Coulombe⁹, Tansu Daylan⁶², Miguel de Val-Borro⁵³, Leen Decin⁶⁴, Leonardo A. Dos Santos⁶⁵, Laura Flagg³⁹, Kevin France⁵⁶, Guangwei Fu¹³,¹⁶, A. Garcia Muñoz³⁶, John E. Gizis⁵⁶, Ana Glidden⁷⁵,⁸⁸, David Grant³, Kevin Heng⁹⁰, Thomas Henning⁹⁰, Yu-Cian Hong⁹⁰, Julie Inglis⁵³, Nicolas Iro⁶⁰, Tiffany Kataria³¹, Thaddeus D. Komacel⁶⁰, Jessica E. Krick⁶¹, Elspeth K. H. Lee⁶², Nikole K. Lewis⁹⁰, Jorge Lillo-Box⁶³, Jacob Lustig-Yaeger²⁶, Luigi Mancini¹⁸,²⁶,⁶⁶, Avi M. Mandel⁵¹, Megan Mansfield²⁸, Mark S. Marley²¹, Thomas Mikal-Evans¹⁸, Giuseppe Morello⁶⁵,⁶⁶,⁶⁷, Matthew C. Nixon⁶⁸, Kevin Ortiz Ceballos¹⁷, Anjali A. A. Piette³⁹, Diana Powell⁷⁷, Benjamin V. Rackham⁵⁷,⁶⁸, Lakeisha Ramos-Rosado¹⁹, Emily Rauscher⁶⁰, Seth Redfield⁷⁰, Laura K. Rogers⁶⁸, Michael T. Roman¹⁷,¹⁸, Gael M. Roudier³¹, Nicholas Scarsdale⁴, Evgenya L. Shkolnik⁹¹, John Southworth⁷², Jessica J. Spake⁵³, Maria E. Steinrueck¹⁸, Xianyu Tan²², Johanna K. Teske³³, Pascal Tremblin⁷³, Shang-Min Tsai²², Gregory S. Tucker⁷⁴, Jake D. Turner³⁹, Jeff A. Valenti¹², Olivia Venot⁷⁵, Ingo P. Waldmann⁴⁹, Nicole L. Wallack³⁵, Xi Zhang⁷⁶ & Sebastian Zieba⁵⁸,²⁸

¹Department of Physics, University of Warwick, Coventry, UK. ²Centre for Exoplanets and Habitability, University of Warwick, Coventry, UK. ³School of Physics, University of Bristol, Bristol, UK. ⁴Department of Astronomy and Astrophysics, University of California, Santa Cruz, Santa Cruz, CA, USA. ⁵NASA Ames Research Center, Moffett Field, CA, USA. ⁶Department of Astronomy and Astrophysics, University of Chicago, Chicago, IL, USA. ⁷Department of Astronomy, University of Wisconsin-Madison, Madison, WI, USA. ⁸BAER Institute, NASA Ames Research Center, Moffett Field, CA, USA. ⁹Department of Physics and Institute for Research on Exoplanets, Université de Montréal, Montreal, Quebec, Canada. ¹⁰Department of Atmospheric and Planetary Sciences, University of Colorado, Boulder, CO, USA. ¹¹Department of Physics and Astronomy, University of Kansas, Lawrence, KS, USA. ¹²Space Telescope Science Institute, Baltimore, MD, USA. ¹³Department of Physics and Astronomy, Johns Hopkins University, Baltimore, MD, USA. ¹⁴School of Physics, Trinity College Dublin, Dublin, Ireland. ¹⁵School of Earth and Planetary Sciences (SEPS), National Institute of Science Education and Research (NISER), HBNI, Jatani, India. ¹⁶Department of Astronomy, University of Maryland, College Park, MD, USA. ¹⁷Center for Astrophysics | Harvard & Smithsonian, Cambridge, MA, USA. ¹⁸Max Planck Institute for Astronomy, Heidelberg, Germany. ¹⁹School of Earth and Space Exploration, Arizona State University, Tempe, AZ, USA. ²⁰Department of Physics, Utah Valley University, Orem, UT, USA. ²¹Lunar and Planetary Laboratory, University of Arizona, Tucson, AZ, USA. ²²Atmospheric, Oceanic and Planetary Sciences, Department of Physics, University of Oxford, Oxford, UK. ²³Université Côte d'Azur, Observatoire de la Côte d'Azur, CNRS, Laboratoire Lagrange, Nice, France. ²⁴Department of Earth and Planetary Sciences, Johns Hopkins University, Baltimore, MD, USA. ²⁵Steward Observatory, University of Arizona, Tucson, AZ, USA. ²⁶Johns Hopkins APL, Laurel, MD, USA. ²⁷European Space Agency, Space Telescope Science Institute, Baltimore, MD, USA. ²⁸Leiden Observatory, University of Leiden, Leiden, The Netherlands. ²⁹INAF - Osservatorio Astrofisico di Torino, Turin, Italy. ³⁰Space Research Institute, Austrian Academy of Sciences, Graz, Austria. ³¹Astrophysics Section, Jet Propulsion Laboratory, California Institute of Technology, Pasadena, CA, USA. ³²Anton Pannekoek Institute for Astronomy, University of Amsterdam, Amsterdam, The Netherlands. ³³Earth and Planets Laboratory, Carnegie Institute for Science, Washington DC, USA. ³⁴Planetary Sciences Group, Department of Physics and Florida Space Institute, University of Central Florida, Orlando, FL, USA. ³⁵Division of Geological and Planetary Sciences, California Institute of Technology, Pasadena, CA, USA. ³⁶Université Paris-Saclay, Université Paris Cité, CEA, CNRS, AIM, Gif-sur-Yvette, ³⁷Laboratoire d'Astrophysique de Bordeaux, Université de Bordeaux, Pessac, France. ³⁸Département d'Astrophysique, Université de Genève, Sauveterre, Switzerland. ³⁹Department of Astronomy and Carl Sagan Institute, Cornell University, Ithaca, NY, USA. ⁴⁰SRON Netherlands Institute for Space Research, Leiden, The Netherlands. ⁴¹Universitäts-Sternwarte, Ludwig-Maximilians-Universität München, Munich, Germany. ⁴²Exzellenzcluster Origins, Garching, Germany. ⁴³Space Science Institute, Boulder, CO, USA. ⁴⁴Department of Physics and Astronomy, Vanderbilt University, Nashville, TN, USA. ⁴⁵Indian Institute of Technology, Indore, India. ⁴⁶School of Physical Sciences, The Open University, Milton Keynes, UK. ⁴⁷Department of Physics, New York University Abu Dhabi, Abu Dhabi, UAE. ⁴⁸School of Physics and Astronomy, University of Leicester, Leicester, UK. ⁴⁹Department of Physics and Astronomy, University College London, London, UK. ⁵⁰Centre for Exoplanet Science, University of St Andrews, St Andrews, UK. ⁵¹NASA Goddard Space Flight Center, Greenbelt, MD, USA. ⁵²Department of Astrophysical Sciences, Princeton University, Princeton, NJ, USA. ⁵³Planetary Science Institute, Tucson, AZ, USA. ⁵⁴Institute of Astronomy, Department of Physics and Astronomy, KU Leuven, Leuven, Belgium. ⁵⁵Laboratory for Atmospheric and Space Sciences, University of Colorado Boulder, Boulder, CO, USA. ⁵⁶Department of Physics and Astronomy, University of Delaware, Newark, DE, USA. ⁵⁷Department of Earth, Atmospheric and Planetary Sciences, Massachusetts Institute of Technology, Cambridge, MA, USA. ⁵⁸Kavli Institute for Astrophysics and Space Research, Massachusetts Institute of Technology, Cambridge, MA, USA. ⁵⁹University Observatory Munich, Ludwig Maximilian University, Munich, Germany. ⁶⁰Institute for Astrophysics, University of Vienna, Vienna, Austria. ⁶¹California Institute of Technology, IPAC, Pasadena, CA, USA. ⁶²Center for Space and Habitability, University of Bern, Bern, Switzerland. ⁶³Departamento de Astrofísica, Centro de Astrobiología (CAB, CSIC-INTA), Madrid, Spain. ⁶⁴Department of Physics, University of Rome "Tor Vergata", Rome, Italy. ⁶⁵Instituto de Astrofísica de Canarias (IAC), Tenerife, Spain. ⁶⁶Departamento de Astrofísica, Universidad de La Laguna (ULL), Tenerife, Spain. ⁶⁷INAF - Palermo Astronomical Observatory, Palermo, Italy. ⁶⁸Institute of Astronomy, University of Cambridge, Cambridge, UK. ⁶⁹Department of Astronomy, University of Michigan, Ann Arbor, MI, USA. ⁷⁰Astronomy Department and Van Vleck Observatory, Wesleyan University, Middletown, CT, USA. ⁷¹Universidad Adolfo Ibáñez: Penalolen, Santiago, Chile. ⁷²Astrophysics Group, Keele University, Staffordshire, UK. ⁷³Maison de la Simulation, CEA, CNRS, Université Paris-Sud, UVSQ, Université Paris-Saclay, Gif-sur-Yvette, France. ⁷⁴Department of Physics, Brown University, Providence, RI, USA. ⁷⁵Université de Paris Cité and Université Paris Est Creteil, CNRS, LISA, Paris, ⁷⁶Department of Earth and Planetary Sciences, University of California, Santa Cruz, Santa Cruz, CA, USA. ⁷⁷e-mail: Natalie.Batalha@ucsc.edu

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_5.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2022

## JWST Transiting Exoplanet Community Early Release Science Team

Eva-Maria Ahrer¹,², Lili Alderson¹, Natalie M. Batalha⁴,²⁵, Natasha E. Batalha⁵, Jacob L. Bean⁶, Thomas G. Beatty⁷, Taylor J. Bell⁸, Björn Benneke⁹, Zachory K. Berta-Thompson¹⁰, Aarynn L. Carter⁴, Ian J. M. Crossfield¹¹, Néstor Espinoza¹²,¹³, Adina D. Feinstein⁵, Jonathan J. Fortney⁶, Neale P. Gibson¹⁴, Jayesh M. Goyal¹⁵, Eliza M.-R. Kempton¹⁶, James Kirk¹⁷, Laura Kreidberg¹⁸, Mercedes López-Morales¹⁷, Michael R. Line¹⁹, Joshua D. Lothringer²⁰, Sarah E. Moran²¹, Sagnick Mukherjee⁴, Kazumasa Ohno⁴, Vivien Parmentier²²,²³, Caroline Piaulet⁹, Zafar Rustamkulov²⁴, Everett Schlawin²⁵, David K. Sing¹³,²⁴, Kevin B. Stevenson²⁶, Hannah R. Wakeford³, Natalie H. Allen¹⁹, Stephan M. Birkmann²⁷, Jonathan Brande¹⁸, Nicolas Crouzet²⁸, Patricio E. Cubillos²⁹,³⁰, Mario Damiano³¹, Jean-Michel Désert³², Peter Gao³³, Joseph Harrington³⁴, Renyu Hu³¹,³⁵, Sarah Kendrew²⁷, Heather A. Knutson³⁵, Pierre-Olivier Lagaye³⁶, Jérémy Leconte³⁷, Monika Lendl³⁸, Ryan J. MacDonald³⁹, E. M. May²⁶, Yamila Miguel²⁸,⁴⁰, Karan Molaverdikhani¹⁸,⁴¹,⁴², Julianne I. Moses⁴³, Catrina Anne Murray⁴⁰, Molly Nehring¹⁰
25. Lodders K. & Fogley B. *The Planetary Scientist's Companion* (Oxford Univ. Press, 1998).

26. Kreidberg, L. et al. A precise water abundance measurement for the hot Jupiter WASP-43b. *Astrophys. J. Lett.* **793**, L27 (2014).

27. Atreya, S. K. et al. The origin and evolution of Saturn: a post-Cassini perspective. Preprint at https://arxiv.org/abs/2205.06914 (2022).

28. Thorngren, D. & Fortney, J. J. Connecting giant planet atmosphere and interior modeling: constraints on atmospheric metal enrichment. *Astrophys. J. Lett.* **874**, L31 (2019).

29. Tsiaras, A. et al. A population study of gaseous exoplanets. *Astron.* **J. 155**, 156 (2018).

30. Fisher, C. & Heng, J. Retrieval study of 38 WFC3 transmission spectra and resolution of the normalization degeneracy. *Mon. Not. R. Astron. Soc.* **481**, 4698–4727 (2018).

31. Pinhas, A., Madhusudhan, N., Gandhi, S. & MacDonald, R. H₂O abundances and cloud properties in ten hot giant exoplanets. *Mon. Not. R. Astron. Soc.* **482**, 1485–1498 (2019).

32. Welbanks, L. et al. Mass-metallicity trends in transiting exoplanets from atmospheric abundances of H₂O, Na, and K. *Astrophys. J. Lett.* **887**, L20 (2019).

33. Min, M., Ormel, C. W., Chubb, K., Helling, C. & Kawashima, Y. The ARCIS framework for exoplanet atmospheres. Modelling philosophy and retrieval. *Astron. Astrophys.* **642**, A28 (2020).

34. Benneke, B. & Seager, S. How to distinguish between cloudy mini-Neptunes and water/volatile-dominated super-Earths. *Astrophys. J.* **778**, 153 (2013).

35. Jakobsen, P. et al. The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. I. Overview of the instrument and its capabilities. *Astron. Astrophys.* **661**, A80 (2022).

36. Birkmann, S. M. et al. The Near-Infrared Spectrograph (NIRSpec) on the James Webb Space Telescope. IV. Capabilities and predicted performance for exoplanet characterization. *Astron. Astrophys.* **661**, A83 (2022).

37. Rigby, J. et al. Characterization of JWST science performance from commissioning. Preprint at https://arxiv.org/abs/2207.05632 (2022).

38. Rustamkulov, Z., Sing, D. K., Liu, R. & Wang, A. Analysis of a JWST NIRSpec lab time series: characterizing systematics, recovering exoplanet transit spectroscopy, and constraining a noise floor. *Astrophys. J. Lett.* **928**, L7 (2022).

39. Bell, T. J. et al. Eurekal: an end-to-end pipeline for JWST time-series observations. *J. Open Source Sci.* **7**, 4503–4508 (2022).

40. Glidic, K. et al. Atmospheric characterization of hot Jupiter CoRoT-1b using the Wide Field Camera 3 on the Hubble Space Telescope. *J. 164*, 19 (2022).

41. Beichman, C. et al. Observations of transiting exoplanets with the James Webb Space Telescope (JWST). *Publ. Astron. Soc. Prc.* **126**, 1134–1173 (2014).

42. Yamamura, I., Tsuji, T. & Tanabé, T. *AKARI observations of brown dwarfs*. I. CO and CO₂ bands in the near-infrared spectra. *Astrophys. J.* **722**, 682–698 (2010).

43. Lodders, K., Palme, H. & Gail, H.-P. in *Solar System: Astronomy, Astrophysics, and Cosmology Vol. 4B* (ed. Trümper, J. E.) 712 (Landolt-Börnstein - Group VI 'Astronomy and Astrophysics', Springer, 2009).

44. Stevenson, K. B. Quantifying and predicting the presence of clouds in exoplanet atmospheres. *Astrophys. J. Lett.* **817**, L16 (2016).

45. Fu, G. et al. Statistical analysis of Hubble/WFC3 transit spectroscopy of extrasolar planets. *Astrophys. J. Lett.* **847**, L22 (2017).

46. Parmentier, V., Fortney, J. J., Showman, A. P., Morley, C. & Marley, M. S. Transitions in the cloud composition of hot Jupiters. *Astrophys. J.* **828**, 22 (2016).

47. Kataria, T. et al. The atmospheric circulation of a nine-hot-Jupiter sample: probing chemistry and chemistry over a wide phase space. *Astrophys. J.* **821**, 9 (2016).

48. Gao, P. et al. Aerosol composition of hot giant exoplanets dominated by silicates and hydrocarbon hazes. *Nat. Astron.* **4**, 951–956 (2020).

Nikolay K. Nikolov¹², D. J. M. Petit dit de la Roche³⁸, Michael Radica⁹, Pierre-Alexis Roy⁹,

Keivan G. Stassun¹⁴, Jake Taylor⁹, William C. Waalkes¹⁰, Patcharapol Wachiraphan¹⁰,

Luis Welbanks¹⁹, Peter J. Wheatley¹², Keshav Aggarwal⁴⁵, Munazza K. Alam³³,

Agnibha Banerjee⁴⁶, Joanna K. Barstow⁴⁶, Jasmina Blecic⁴⁷, S. L. Casewell⁴⁸,

Quentin Changeat⁴⁹, K. L. Chubb⁵⁰, Knicole D. Colón⁵¹, Louis-Philipp Coulombe⁹,

Tansu Daylan⁶², Miguel de Val-Borro⁵³, Leen Decin⁶⁴, Leonardo A. Dos Santos⁶⁵,

Laura Flagg³⁹, Kevin France⁵⁶, Guangwei Fu¹³,¹⁶, A. Garcia Muñoz³⁶, John E. Gizis⁵⁶,

Ana Glidden⁷⁷,⁸⁸, David Grant³, Kevin Heng⁹⁰, Thomas Henning⁹⁰, Yu-Cian Hong⁹⁰,

Julie Inglis⁵³, Nicolas Iro⁶⁰, Tiffany Kataria³¹, Thaddeus D. Komacel⁶⁰, Jessica E. Krick⁶¹,

Elspeth K. H. Lee⁶², Nikole K. Lewis⁹⁰, Jorge Lillo-Box⁸³, Jacob Lustig-Yaeger²⁶,

Luigi Mancini¹⁸,²⁶,⁸⁶, Avi M. Mandel⁵¹, Megan Mansfield²⁸, Mark S. Marley²¹,

Thomas Mikal-Evans¹⁸, Giuseppe Morello⁶⁵,⁶⁶,⁶⁷, Matthew C. Nixon⁶⁸, Kevin Ortiz Ceballos¹⁷,

Anjali A. A. Piette³⁹, Diana Powell⁷⁷, Benjamin V. Rackham⁵⁷,⁶⁸, Lakeisha Ramos-Rosado¹⁹,

Emily Rauscher⁶⁹, Seth Redfield⁷⁰, Laura K. Rogers⁶⁸, Michael T. Roman²⁷,

Gael M. Roudier³¹, Nicholas Scarsdale⁴, Evgenya L. Shkolnik⁹¹, John Southworth⁷²,

Jessica J. Spake⁵³, Maria E. Steinrueck¹⁸, Xianyu Tan²², Johanna K. Teske³³, Pascal Tremblin⁷³,

Shang-Min Tsai²², Gregory S. Tucker⁷⁴, Jake D. Turner³⁹, Jeff A. Valenti², Olivia Venot⁷⁵,

Ingo P. Waldmann⁴⁹, Nicole L. Wallack³⁵, Xi Zhang⁷⁶ & Sebastian Zieba⁵⁸,²⁸

¹Department of Physics, University of Warwick, Coventry, UK. ²Centre for Exoplanets and Habitability, University of Warwick, Coventry, UK. ³School of Physics, University of Bristol, Bristol, UK. ⁴Department of Astronomy and Astrophysics, University of California, Santa Cruz, Santa Cruz, CA, USA. ⁵NASA Ames Research Center, Moffett Field, CA, USA. ⁶Department of Astronomy and Astrophysics, University of Chicago, Chicago, IL, USA. ⁷Department of Astronomy, University of Wisconsin-Madison, Madison, WI, USA. ⁸BAER Institute, NASA Ames Research Center, Moffett Field, CA, USA. ⁹Department of Physics and Institute for Research on Exoplanets, Université de Montréal, Montreal, Quebec, Canada. ¹⁰Department of Atmospheric and Planetary Sciences, University of Colorado, Boulder, CO, USA. ¹¹Department of Physics and Astronomy, University of Kansas, Lawrence, KS, USA. ¹²Space Telescope Science Institute, Baltimore, MD, USA. ¹³Department of Physics and Astronomy, Johns Hopkins University, Baltimore, MD, USA. ¹⁴School of Physics, Trinity College Dublin, Dublin, Ireland. ¹⁵School of Earth and Planetary Sciences (SEPS), National Institute of Science Education and Research (NISER), HBNI, Jatani, India. ¹⁶Department of Astronomy, University of Maryland, College Park, MD, USA. ¹⁷Center for Astrophysics | Harvard & Smithsonian, Cambridge, MA, USA. ¹⁸Planck Institute for Astronomy, Heidelberg, Germany. ¹⁹School of Earth and Space Exploration, Arizona State University, Tempe, AZ, USA. ²⁰Department of Physics, Utah Valley University, Orem, UT, USA. ²¹Lunar and Planetary Laboratory, University of Arizona, Tucson, AZ, USA. ²²Atmospheric, Oceanic and Planetary Sciences, Department of Physics, University of Oxford, Oxford, UK. ²³Université Côte d'Azur, Observatoire de la Côte d'Azur, CNRS, Laboratoire Lagrange, Nice, France. ²⁴Department of Earth and Planetary Sciences, Johns Hopkins University, Baltimore, MD, USA. ²⁵Steward Observatory, University of Arizona, Tucson, AZ, USA. ²⁶Johns Hopkins APL, Laurel, MD, USA. ²⁷European Space Agency, Space Telescope Science Institute, Baltimore, MD, USA. ²⁸Leiden Observatory, University of Leiden, Leiden, The Netherlands. ²⁹INAF – Osservatorio Astrofisico di Torino, Turin, Italy. ³⁰Space Research Institute, Austrian Academy of Sciences, Graz, Austria. ³¹Astrophysics Section, Jet Propulsion Laboratory, California Institute of Technology, Pasadena, CA, USA. ³²Anton Pannekoek Institute for Astronomy, University of Amsterdam, Amsterdam, The Netherlands. ³³Earth and Planets Laboratory, Carnegie Institute for Science, Washington DC, USA. ³⁴Planetary Sciences Group, Department of Physics and Florida Space Institute, University of Central Florida, Orlando, FL, USA. ³⁵Division of Geological and Planetary Sciences, California Institute of Technology, Pasadena, CA, USA. ³⁶Université Paris-Saclay, Université Paris Cité, CEA, CNRS, AIM, Gif-sur-Yvette, ³⁷Laboratoire d'Astrophysique de Bordeaux, Université de Bordeaux, Pessac, France. ³⁸Département d'Astrophysique, Université de Genève, Sauveterre, Switzerland. ³⁹Department of Astronomy and Carl Sagan Institute, Cornell University, Ithaca, NY, USA. ⁴⁰SRON Netherlands Institute for Space Research, Leiden, The Netherlands. ⁴¹Universitäts-Sternwarte, Ludwig-Maximilians-Universität München, Munich, Germany. ⁴²Exzellenzcluster Origins, Garching, Germany. ⁴³Space Science Institute, Boulder, CO, USA. ⁴⁴Department of Physics and Astronomy, Vanderbilt University, Nashville, TN, USA. ⁴⁵Indian Institute of Technology, Indore, India. ⁴⁶School of Physical Sciences, The Open University, Milton Keynes, UK. ⁴⁷Department of Physics, New York University Abu Dhabi, Abu Dhabi, UAE. ⁴⁸School of Physics and Astronomy, University of Leicester, Leicester, UK. ⁴⁹Department of Physics and Astronomy, University College London, London, UK. ⁵⁰Centre for Exoplanet Science, University of St Andrews, St Andrews, UK. ⁵¹NASA Goddard Space Flight Center, Greenbelt, MD, USA. ⁵²Department of Astrophysical Sciences, Princeton University, Princeton, NJ, USA. ⁵³Planetary Science Institute, Tucson, AZ, USA. ⁵⁴Institute of Astronomy, Department of Physics and Astronomy, KU Leuven, Leuven, Belgium. ⁵⁵Laboratory for Atmospheric and Space Sciences, University of Colorado Boulder, Boulder, CO, USA.

⁵⁶Department of Physics and Astronomy, University of Delaware, Newark, DE, USA. ⁵⁷Department of Earth, Atmospheric and Planetary Sciences, Massachusetts Institute of Technology, Cambridge, MA, USA. ⁵⁸Kavli Institute for Astrophysics and Space Research, Massachusetts Institute of Technology, Cambridge, MA, USA. ⁵⁹University Observatory Munich, Ludwig Maximilian University, Munich, Germany. ⁶⁰Institute for Astrophysics, University of Vienna, Vienna, Austria. ⁶¹California Institute of Technology, IPAC, Pasadena, CA, USA. ⁶²Center for Space and Habitability, University of Bern, Bern, Switzerland. ⁶³Departamento de Astrofísica, Centro de Astrobiología (CAB, CSIC-INTA), Madrid, Spain. ⁶⁴Department of Physics, University of Rome "Tor Vergata", Rome, Italy. ⁶⁵Instituto de Astrofísica de Canarias (IAC), Tenerife, Spain. ⁶⁶Departamento de Astrofísica, Universidad de La Laguna (ULL), Tenerife, Spain. ⁶⁷INAF – Palermo Astronomical Observatory, Palermo, Italy. ⁶⁸Institute of Astronomy, University of Cambridge, Cambridge, UK. ⁶⁹Department of Astronomy, University of Michigan, Ann Arbor, MI, USA.

⁷⁰Astronomy Department and Van Vleck Observatory, Wesleyan University, Middletown, CT, USA. ⁷¹Universidad Adolfo Ibáñez: Penalolen, Santiago, Chile. ⁷²Astrophysics Group, Keele University, Staffordshire, UK. ⁷³Maison de la Simulation, CEA, CNRS, Université Paris-Sud, UVSQ, Université Paris-Saclay, Gif-sur-Yvette, France. ⁷⁴Department of Physics, Brown University, Providence, RI, USA. ⁷⁵Université de Paris Cité and Université Paris Est Creteil, CNRS, LISA, Paris, ⁷⁶Department of Earth and Planetary Sciences, University of California, Santa Cruz, Santa Cruz, CA, USA. ⁷⁷e-mail: Natalie.Batalha@ucsc.edu

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_8.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2022

## JWST Transiting Exoplanet Community Early Release Science Team

Eva-Maria Ahrer¹,², Lili Alderson³, Natalie M. Batalha⁴,⁵, Natasha E. Batalha⁵, Jacob L. Bean⁶, Thomas G. Beatty⁷, Taylor J. Bell⁸, Björn Benneke⁹, Zachary K. Berta-Thompson¹⁰, Aarynn L. Carter⁴, Ian J. M. Crossfield¹¹, Néstor Espinoza¹²,¹³, Adina D. Feinstein⁵, Jonathan J. Fortney⁶, Neale P. Gibson¹⁴, Jayesh M. Goyal¹⁵, Eliza M.-R. Kempton¹⁶, James Kirk¹⁷, Laura Kreidberg¹⁸, Mercedes López-Morales¹⁷, Michael R. Line¹⁹, Joshua D. Lothringer²⁰, Sarah E. Moran²¹, Sagnick Mukherjee⁴, Kazumasa Ohno⁴, Vivien Parmentier²²,²³, Caroline Piaulet⁹, Zafar Rustamkulov²⁴, Everett Schlawin²⁵, David K. Sing¹⁹,²⁴, Kevin B. Stevenson²⁶, Hannah R. Wakeford³, Natalie H. Allen¹⁹, Stephan M. Birkmann²⁷, Jonathan Brande¹⁸, Nicolas Crouzet²⁸, Patricio E. Cubillos²⁹,³⁰, Mario Damiano³¹, Jean-Michel Désert³², Peter Gao³³, Joseph Harrington³⁴, Renyu Hu³¹,³⁵, Sarah Kendrew²⁷, Heather A. Knutson³⁵, Pierre-Olivier Lagaye³⁶, Jérémy Leconte³⁷, Monika Lendl³⁸, Ryan J. MacDonald³⁹, E. M. May²⁶, Yamila Miguel²⁸,⁴⁰, Karan Molaverdikhani¹⁸,⁴¹,⁴², Julianne I. Moses⁴³, Catrina Anne Murray⁴⁰, Molly Nehring¹⁰,
# Methods

## Data reduction

We reduced the JWST NIRSpec PRISM data for WASP-39b using four separate pipelines to confirm that the results did not depend on the specifics of the analyses, as was sometimes the case for results from the Spitzer Space Telescope (for example, ref. ⁴⁹). The descriptions below refer to calibration pipelines and other software whose code and citations appear in 'Code availability'.

## tshirt pipeline

We used the Time Series Helper and Integration Reduction Tool⁴⁰ (tshirt) to extract light curves of the spectrum. This pipeline modifies the JWST Calibration pipeline steps to improve the precision of the reduction. tshirt has been used to successfully analyse the JWST transit observations of HAT-P-14b that were obtained during commissioning with the Near Infrared Camera (NIRCam)³⁷. First, we used an updated bias frame from commissioning programme 1130 observation 29 and ran the JWST Calibration pipeline until the reference pixels step. We then applied a correction for 1/f/noise (so named since the noise power is inversely proportional to the signal frequency, f), which varies for odd and even rows and for each column. We use background pixels for the calibration as reference pixels are not available in this subarray. We skipped the jump and dark subtraction steps because they were seen to add noise to the light curves. tshirt fits the profile of the spectrum with splines and rejects outlier pixels that are more than 50σ from the spline fits. We used covariance-weighted extraction⁵⁰ with an assumed pixel correlation of 0.08. For spectral extraction, we used a background region no closer than 7 pixels on either side of the source and an extraction region width of 16 pixels. The scatter in the light curve was consistent with the theoretical limit of photon and read noise over short timescales.

We fit the light curves with a second-order (quadratic) polynomial baseline, uninformative quadratic limb-darkening priors and an exponential start-up ramp with 10σ clipping of outliers. To begin, we fit the white-light curve with priors on the transit centre, inclination and period from ref. ²². We also used the ratio *a*/R (where *a* is the semi-major axis and R is the stellar radius) from ref. ²² but widened the uncertainty on this parameter because the enforced prior resulted in significant residuals. Next, we fit each spectroscopic light curve individually with the orbital parameters fixed at the value from the white-light posterior medians. We modelled the light curves using the 'exoplanet' code³¹ and the pycm3⁵² sampler. We evaluated the wavelengths using the JWST Calibration pipeline at pixel row 16 (Y = 16) from the world coordinate solution. This uses an instrument model and could not be verified owing to a lack of strong stellar absorption features at the NIRSpec resolution. All the other reductions adopted this wavelength calibration. As shown in Fig. 1, the standard deviation in the out-of-transit light curve approaches the theoretical limit of photon and read noise at short wavelengths, but is 20% to 40% higher at longer wavelengths, which may be related to uncorrected 1/f/noise.

## Eureka! pipeline

Eureka!³⁹ is a data reduction and analysis pipeline for time-series observations with the JWST or the Hubble Space Telescope. Its modular, multi-stage design provides flexibility and ease of comparison at any step, starting from uncalibrated FITS files and resulting in precise transmission or emission spectra. Eureka! has been used to successfully analyse the JWST transit observations of HAT-P-14b that were obtained during commissioning with NIRCam³⁷.

We began the data reduction process using the uncalibrated raw data files with the "uncal" suffix available from the Mikulski Archive for Space Telescopes (MAST) archive. The first stage of the Eureka! pipeline is primarily a wrapper for Stage 1 of the JWST Calibration pipeline, which converts groups to slopes. For this dataset, we skipped

the jump detection step as it led to a large fraction of detector pixels being incorrectly flagged as outliers. We did, however, search for and flag outliers at multiple points in subsequent stages. We also manually updated the bad-pixel map to include identified hot pixels on the detector that were not provided in the current (July 2022) full-detector STScI data-quality map. As part of Eureka!, we performed a custom background subtraction at the group level before Stage 1 ramp fitting to account for 1/f/noise introduced during detector readout. We set the top and bottom six rows of the detector as our background region and flagged pixels deemed outliers at >3σ. We then subtracted the mean flux per pixel column and repeated this for each group and integration in the observation. Similarly to Stage 1, the second stage of the Eureka! pipeline is a wrapper for Stage 2 of the JWST Calibration pipeline, which calibrates the two-dimensional time series of fitted slopes. Here, we skipped the flux calibration step, thus leaving the data in units of digital number (DN) per second (DN s⁻¹).

For Stage 3, we performed background subtraction and optimal extraction of the stellar spectrum for each integration with Eureka!. We used only pixels 14 to 495 in the dispersion direction of the 512 × 32-pixel subarray, as NIRSpec's throughput is negligible beyond this range. We also masked pixels that have a non-zero data-quality flag to avoid any impact of outlier pixels on the extracted spectra or background subtraction. The position of the source on the detector along the cross-dispersion dimension is located by fitting a Gaussian to the pixel values summed over all detector columns. For each pixel, we examined its flux variation in time and performed a double-iteration, 10σ-outlier rejection test. We then executed a second column-by-column background subtraction, this time at the integration level, using pixels located at least 8 pixels away from the source position to compute the mean background per column. Performing this additional background subtraction reduced the number of outliers in the measured light curves and accounted for the residual background and/or noise introduced during the ramp fitting procedure. As with Stage 1, we exclude 3σ outliers from our background region. We adopted an aperture half-width of 7 pixels for our optimal spectral extraction step, constructing the profile from the median frame. At the end of this stage, we obtained a time series of one-dimensional spectra.

For the remaining stages, we used multiple pipelines (Eureka!³⁹ and ExoTEP⁵³⁻⁵⁵) to generate and fit the light curves. We first generated median-normalized light curves at the instrument's native resolution (that is, from each detector column) using our Stage 3 outputs. We then clipped additional outliers in time for the white and spectroscopic light curves. For this step, we first rejected integrations that were more than 3σ outliers for the source position in the cross-dispersion direction, the width of the fitted Gaussian to the spatial profile or the drift in the dispersion direction. Next, we produced a median-filtered version of the light curve and clipped out 3σ outliers in flux. We jointly fit astrophysical and systematics model parameters to the white and individual spectroscopic light curves. Our astrophysical transit model used the batman package⁵⁶ with uniform priors, fitting for the following astrophysical parameters: the two coefficients of a stellar quadratic limb-darkening law, impact parameter, semi-major axis, transit time and the planet-to-star radius ratio (R_p/R). In each of the wavelength channels. Although the limb-darkening coefficients and planet-to-star radius ratio were fit independently in each spectroscopic channel, we used the best-fitting value of the planet's impact parameter, semi-major axis and transit time from a white-light curve fit as a fixed value in the wavelength-dependent fits. For the systematics model, we assumed a linear trend in time for each wavelength channel, fitting for both the slope and y intercept. Last, we fit a single-point scatter to each light curve, which illustrates the level of additional noise required for our joint model to reach a reduced chi-squared (χ²) of unity. The white-light curve residuals have a root mean square (r.m.s.) of 3,013 ppm, and the spectroscopic light curves above 3 µm have a median r.m.s. of 5,779 ppm. Similar to the reduction shown in Fig. 1, both pipelines
# Methods

## Data reduction

We reduced the JWST NIRSpec PRISM data for WASP-39b using four separate pipelines to confirm that the results did not depend on the specifics of the analyses, as was sometimes the case for results from the Spitzer Space Telescope (for example, ref. ⁴⁹). The descriptions below refer to calibration pipelines and other software whose code and citations appear in 'Code availability'.

## tshirt pipeline

We used the Time Series Helper and Integration Reduction Tool⁴⁰ (tshirt) to extract light curves of the spectrum. This pipeline modifies the JWST Calibration pipeline steps to improve the precision of the reduction. tshirt has been used to successfully analyse the JWST transit observations of HAT-P-14b that were obtained during commissioning with the Near Infrared Camera (NIRCam)³⁷. First, we used an updated bias frame from commissioning programme 1130 observation 29 and ran the JWST Calibration pipeline until the reference pixels step. We then applied a correction for 1/f/noise (so named since the noise power is inversely proportional to the signal frequency, $f$), which varies for odd and even rows and for each column. We use background pixels for the calibration as reference pixels are not available in this subarray. We skipped the jump and dark subtraction steps because they were seen to add noise to the light curves. tshirt fits the profile of the spectrum with splines and rejects outlier pixels that are more than 50σ from the spline fits. We used covariance-weighted extraction⁵⁰ with an assumed pixel correlation of 0.08. For spectral extraction, we used a background region no closer than 7 pixels on either side of the source and an extraction region width of 16 pixels. The scatter in the light curve was consistent with the theoretical limit of photon and read noise over short timescales.

We fit the light curves with a second-order (quadratic) polynomial baseline, uninformative quadratic limb-darkening priors and an exponential start-up ramp with $10\sigma$ clipping of outliers. To begin, we fit the white-light curve with priors on the transit centre, inclination and period from ref. ²². We also used the ratio $a/R$ (where $a$ is the semi-major axis and $R$ is the stellar radius) from ref. ²² but widened the uncertainty on this parameter because the enforced prior resulted in significant residuals. Next, we fit each spectroscopic light curve individually with the orbital parameters fixed at the value from the white-light posterior medians. We modelled the light curves using the 'exoplanet' code³¹ and the pycm3⁵² sampler. We evaluated the wavelengths using the JWST Calibration pipeline at pixel row 16 ($Y=16$) from the world coordinate solution. This uses an instrument model and could not be verified owing to a lack of strong stellar absorption features at the NIRSpec resolution. All the other reductions adopted this wavelength calibration. As shown in Fig. 1, the standard deviation in the out-of-transit light curve approaches the theoretical limit of photon and read noise at short wavelengths, but is 20% to 40% higher at longer wavelengths, which may be related to uncorrected 1/f/noise.

## Eureka! pipeline

Eureka!³⁹ is a data reduction and analysis pipeline for time-series observations with the JWST or the Hubble Space Telescope. Its modular, multi-stage design provides flexibility and ease of comparison at any step, starting from uncalibrated FITS files and resulting in precise transmission or emission spectra. Eureka! has been used to successfully analyse the JWST transit observations of HAT-P-14b that were obtained during commissioning with NIRCam³⁷.

We began the data reduction process using the uncalibrated raw data files with the "uncal" suffix available from the Mikulski Archive for Space Telescopes (MAST) archive. The first stage of the Eureka! pipeline is primarily a wrapper for Stage 1 of the JWST Calibration pipeline, which converts groups to slopes. For this dataset, we skipped

the jump detection step as it led to a large fraction of detector pixels being incorrectly flagged as outliers. We did, however, search for and flag outliers at multiple points in subsequent stages. We also manually updated the bad-pixel map to include identified hot pixels on the detector that were not provided in the current (July 2022) full-detector STScI data-quality map. As part of Eureka!, we performed a custom background subtraction at the group level before Stage 1 ramp fitting to account for 1/f/noise introduced during detector readout. We set the top and bottom six rows of the detector as our background region and flagged pixels deemed outliers at >3σ. We then subtracted the mean flux per pixel column and repeated this for each group and integration in the observation. Similarly to Stage 1, the second stage of the Eureka! pipeline is a wrapper for Stage 2 of the JWST Calibration pipeline, which calibrates the two-dimensional time series of fitted slopes. Here, we skipped the flux calibration step, thus leaving the data in units of digital number (DN) per second (DN s⁻¹).

For Stage 3, we performed background subtraction and optimal extraction of the stellar spectrum for each integration with Eureka!. We used only pixels 14 to 495 in the dispersion direction of the 512 × 32-pixel subarray, as NIRSpec's throughput is negligible beyond this range. We also masked pixels that have a non-zero data-quality flag to avoid any impact of outlier pixels on the extracted spectra or background subtraction. The position of the source on the detector along the cross-dispersion dimension is located by fitting a Gaussian to the pixel values summed over all detector columns. For each pixel, we examined its flux variation in time and performed a double-iteration, $10\sigma$-outlier rejection test. We then executed a second column-by-column background subtraction, this time at the integration level, using pixels located at least 8 pixels away from the source position to compute the mean background per column. Performing this additional background subtraction reduced the number of outliers in the measured light curves and accounted for the residual background and/or noise introduced during the ramp fitting procedure. As with Stage 1, we exclude $3\sigma$ outliers from our background region. We adopted an aperture half-width of 7 pixels for our optimal spectral extraction step, constructing the profile from the median frame. At the end of this stage, we obtained a time series of one-dimensional spectra.

For the remaining stages, we used multiple pipelines (Eureka!³⁹ and ExoTEP⁵³⁻⁵⁵) to generate and fit the light curves. We first generated median-normalized light curves at the instrument's native resolution (that is, from each detector column) using our Stage 3 outputs. We then clipped additional outliers in time for the white and spectroscopic light curves. For this step, we first rejected integrations that were more than $3\sigma$ outliers for the source position in the cross-dispersion direction, the width of the fitted Gaussian to the spatial profile or the drift in the dispersion direction. Next, we produced a median-filtered version of the light curve and clipped out $3\sigma$ outliers in flux. We jointly fit astrophysical and systematics model parameters to the white and individual spectroscopic light curves. Our astrophysical transit model used the batman package⁵⁶ with uniform priors, fitting for the following astrophysical parameters: the two coefficients of a stellar quadratic limb-darkening law, impact parameter, semi-major axis, transit time and the planet-to-star radius ratio ($R_p/R$) in each of the wavelength channels. Although the limb-darkening coefficients and planet-to-star radius ratio were fit independently in each spectroscopic channel, we used the best-fitting value of the planet's impact parameter, semi-major axis and transit time from a white-light curve fit as a fixed value in the wavelength-dependent fits. For the systematics model, we assumed a linear trend in time for each wavelength channel, fitting for both the slope and y intercept. Last, we fit a single-point scatter to each light curve, which illustrates the level of additional noise required for our joint model to reach a reduced chi-squared ($\chi^2$) of unity. The white-light curve residuals have a root mean square (r.m.s.) of 3,013 ppm, and the spectroscopic light curves above 3 µm have a median r.m.s. of 5,779 ppm. Similar to the reduction shown in Fig. 1, both pipelines
reach near photon noise. The Eureka! and ExoTEP transmission spectra appear nearly identical; therefore, only one (Eureka!) is shown in Fig. 2.

## Tiberius pipeline

We built on the pipeline developed for the analysis of the Low Resolution Ground-Based Exoplanet Survey using Transmission Spectroscopy (LRG-BEASTS) data<sup>21,57,58</sup> to provide an independent reduction of the data. We began with the outputs of the JWST Calibration Stage 1 pipeline with the jump step correction turned off. We created bad-pixel and cosmic-ray masks by identifying $5\sigma$ outliers in running medians operating along pixel rows and along individual pixels in time. Before tracing the spectra, we interpolated each column of the detector onto a finer grid, ten times the initial spatial resolution, to improve the extraction of flux at the subpixel level. We used a fourth-order polynomial to trace the spectra and a four-pixel-wide aperture. To remove the 1/f noise, we fit a linear polynomial to 21 background pixels along each column in the cross-dispersion direction. Next, to correct for shifts in the dispersion direction, we cross-correlated each stellar spectrum with the first spectrum of the observation to account for very small (0.003–0.005) subpixel shifts. Our white-light curve spans a wavelength range of 0.518–5.348 µm after masking saturated pixels, and our 147 spectroscopic light curves used 3-pixel-wide bins across this same wavelength range. We masked frames 20751–20765 owing to a high-gain-antenna move that led to increased noise in the light curves.

We fit our light curves with a combination of a quadratically limb-darkened transit model (through batman<sup>56</sup>) with a linear-in-time polynomial. We began by fitting the white-light curve to derive the system parameters: inclination, *i*, time of mid-transit, $T_c$, the semi-major axis scaled to the stellar radius, $a/R$, and the linear limb-darkening coefficient, $u_1$. We placed wide boundaries on the parameter values only to prevent unphysical values. In practice, the parameter values did not get close to the boundaries. We fixed the planet's orbital period to 4.0552941 d and the eccentricity to 0 from ref. <sup>22</sup>. We fixed the quadratic coefficient, $u_2$, to theoretical values determined by ExoTiC-LD<sup>59,60</sup> with three-dimensional stellar models<sup>61</sup>, and fit for $u_1$. We used a Levenberg-Marquardt algorithm to fit our light curves, rescaled our photometric uncertainties to give a reduced $X^2=1$ for our best-fit model and then re-ran the fits. For the spectroscopic light curves, the system parameters ($i$, $T_c$ and $a/R$) were held fixed to the best-fit values found from the white-light curve. The white-light curve residuals had an r.m.s. of 2.761 ppm and the spectroscopic light curve residuals had a median r.m.s. of 6.731 ppm. In both cases, the variance of the residuals scales upon binning as expected for Poisson noise.

## FIREFly pipeline

We also reduced the data using the FIREFly reduction routines<sup>38</sup>. These routines utilize the JWST Calibration pipeline with custom modifications. This pipeline has been used to successfully analyse the JWST transit observations of HAT-P-14b that were obtained during commissioning with NIRSpec G395<sup>37</sup>. We removed 1/f noise (see ref. <sup>36</sup>) at the group level, as the 1/f noise changes from group to group. We also skipped the jump step and instead flagged and removed cosmic rays, bad pixels, hot pixels and other outliers using median filtering of the data both spatially and in time, flagging pixels using a $5\sigma$-outlier threshold algorithm. The time series of two-dimensional spectra were aligned using cross-correlation and interpolation, with the time-series spectra exhibiting an r.m.s. jitter of 0.005 pixels in the x-axis direction and 0.0026 pixels in the y-axis direction. We found a small inverse ramp in the light curves, which settled down after the first 2,000 exposures, which we discarded. We fit the light curves with the batman<sup>56</sup> transit model along with a linear baseline and a second-order jitter detrending polynomial of x and y detector position as described by ref. <sup>38</sup>, which are present in the spectrophotometry at the 53 ± 2-ppm level in the x direction and at the 140 ± 3-ppm level in the y direction. We applied a fixed

quadratic limb-darkening law using the three-dimensional models<sup>61</sup> computed using the methods of ref. <sup>62</sup> from ExoTiC-LD<sup>59,60</sup>. In fitting the 3 µm to 5.5 µm white-light curve, we allowed the semi-major axis in units of stellar radii $a/R$, inclination *i* and central transit time $T_0$ to freely vary along with the transit depth and systematics model. We used the Markov chain Monte Carlo sampling routine emcee<sup>63</sup> to find the best-fit parameters and measure the posterior distribution. We find the 3–5.5 µm white-light curve has a transit depth of 2.1368 ± 0.0014% and achieves 808-ppm scatter in the residuals. This is within 6% of the expected noise limit of 758 ppm as calculated by the JWST Calibration pipeline, with the scatter of the residuals decreasing to below 40 ppm upon binning with no detectable red noise. We fit each spectroscopic light curve shown in Fig. 1 with the same astrophysical and systematic models as the white-light curve, except fixing the system parameters ($a/R$, *i* and $T_0$). The transmission spectral light-curve residuals for each bin are typically within 5% of pipeline error or better, also with no detectable red noise.

## Data-model comparison

We compared the extracted transmission spectral data to a suite of one-dimensional self-consistent radiative–convective–thermochemical equilibrium model atmospheres (see, for example, refs. <sup>64,65</sup> for a general description of such models) described below. In short, all models are able to fit the 3–5.5 µm spectra consistently (with $X^2/N_{data} < 1.4$, where $N_{data}$ is the number of spectral data points) with a 10-times-solar metal enrichment and varying grey cloud opacity for their single best estimate. Comparisons of the model fits from each grid are shown in Extended Data Fig. 1. For additional parameters within the grid (for example, carbon-to-oxygen ratio (C/O) and heat redistribution), there is some discrepancy between each model grid’s single best estimate values. Additional Bayesian analyses are needed to rigorously quantify confidence intervals on atmospheric properties of interest, which is beyond the scope of this work. Future works will focus on modelling that includes the effects of disequilibrium chemistry, aerosol microphysics and three-dimensional circulation effects. We assumed the following parameters in the modelling: stellar effective temperature, $T_{\text{eff}} = 5,512$ K, stellar radius = 0.932 $R_\odot$, planet mass = 0.281 $M_\oplus$, planet radius = 1.279 $R_j$ and planet orbital semi-major axis = 0.04828 AU.

## SCCHIMERA

This framework was first described in refs. <sup>66,67</sup>, with the most recent updates, methods and opacity sources described in ref. <sup>68</sup>. We compute the converged atmospheric structure (temperature–pressure and thermochemical equilibrium gas mixing ratio profiles) over a grid of atmospheric metallicity ([M/H], where the square brackets indicate $\log_{10}$ enrichment relative to solar<sup>43</sup>) spaced at 0.25-dex intervals between 0 and 2.25 (1- to 175-times solar) and C/O at values of 0.20, 0.35, 0.55, 0.70, 0.75 and 0.80. We assume full day-to-night temperature redistribution<sup>69</sup> as planets in this temperature regime are unlikely to possess strong day-to-night temperature contrast<sup>70,71</sup>. We then compute transmission spectra<sup>72,73</sup> from these converged atmospheric structures. To match the models to the data, the DYNESTY<sup>74</sup> fitting routine is used to search for the optimal [M/H] and C/O (via nearest neighbour) while simultaneously adjusting the 1-bar planetary radius (which controls the absolute transit depth) and an opaque, grey, uniformly vertically distributed, cloud opacity ($\kappa_{\text{cld}}$). The optimal model resulting from this process is [M/H] = +1.0, C/O = 0.35 and $\log_{10}\kappa_{\text{cld}} = -2.15 \text{ cm}^2 \text{ g}^{-1}$. The metallicity and cloud opacity are primarily driven by the strength of the 4.3-µm $CO_2$ feature and lack of methane ($CH_4$) absorption near 3.3 µm. This result is what is shown in the main text (Fig. 3), which also illustrates the relative contribution of the key opacity sources ($H_2O$ (refs. <sup>75,76</sup>), CO (refs. <sup>77,78</sup>), $CO_2$ (refs. <sup>79,80</sup>), $H_2S$ (refs. <sup>78,81</sup>) and $CH_4$ (refs. <sup>78,82</sup>)) to the overall spectral shape. Extended Data Fig. 2 shows the atmospheric structure (temperature profile and gas mixing ratio profiles) for this best-fit model.
reach near photon noise. The Eureka! and ExoTEP transmission spectra appear nearly identical; therefore, only one (Eureka!) is shown in Fig. 2.

## Tiberius pipeline

We built on the pipeline developed for the analysis of the Low Resolution Ground-Based Exoplanet Survey using Transmission Spectroscopy (LRG-BEASTS) data<sup>21,57,58</sup> to provide an independent reduction of the data. We began with the outputs of the JWST Calibration Stage 1 pipeline with the jump step correction turned off. We created bad-pixel and cosmic-ray masks by identifying $5\sigma$ outliers in running medians operating along pixel rows and along individual pixels in time. Before tracing the spectra, we interpolated each column of the detector onto a finer grid, ten times the initial spatial resolution, to improve the extraction of flux at the subpixel level. We used a fourth-order polynomial to trace the spectra and a four-pixel-wide aperture. To remove the 1/f noise, we fit a linear polynomial to 21 background pixels along each column in the cross-dispersion direction. Next, to correct for shifts in the dispersion direction, we cross-correlated each stellar spectrum with the first spectrum of the observation to account for very small (0.003–0.005) subpixel shifts. Our white-light curve spans a wavelength range of 0.518–5.348 µm after masking saturated pixels, and our 147 spectroscopic light curves used 3-pixel-wide bins across this same wavelength range. We masked frames 20751–20765 owing to a high-gain-antenna move that led to increased noise in the light curves.

We fit our light curves with a combination of a quadratically limb-darkened transit model (through batman<sup>56</sup>) with a linear-in-time polynomial. We began by fitting the white-light curve to derive the system parameters: inclination, *i*, time of mid-transit, $T_c$, the semi-major axis scaled to the stellar radius, $a/R$, and the linear limb-darkening coefficient, $u_1$. We placed wide boundaries on the parameter values only to prevent unphysical values. In practice, the parameter values did not get close to the boundaries. We fixed the planet's orbital period to 4.0552941 d and the eccentricity to 0 from ref. <sup>22</sup>. We fixed the quadratic coefficient, $u_2$, to theoretical values determined by ExoTiC-LD<sup>59,60</sup> with three-dimensional stellar models<sup>61</sup>, and fit for $u_1$. We used a Levenberg-Marquardt algorithm to fit our light curves, rescaled our photometric uncertainties to give a reduced $X^2=1$ for our best-fit model and then re-ran the fits. For the spectroscopic light curves, the system parameters ($i$, $T_c$ and $a/R$) were held fixed to the best-fit values found from the white-light curve. The white-light curve residuals had an r.m.s. of 2.761 ppm and the spectroscopic light curve residuals had a median r.m.s. of 6.731 ppm. In both cases, the variance of the residuals scales upon binning as expected for Poisson noise.

## FIREFly pipeline

We also reduced the data using the FIREFly reduction routines<sup>38</sup>. These routines utilize the JWST Calibration pipeline with custom modifications. This pipeline has been used to successfully analyse the JWST transit observations of HAT-P-14b that were obtained during commissioning with NIRSpec G395<sup>37</sup>. We removed 1/f noise (see ref. <sup>36</sup>) at the group level, as the 1/f noise changes from group to group. We also skipped the jump step and instead flagged and removed cosmic rays, bad pixels, hot pixels and other outliers using median filtering of the data both spatially and in time, flagging pixels using a $5\sigma$-outlier threshold algorithm. The time series of two-dimensional spectra were aligned using cross-correlation and interpolation, with the time-series spectra exhibiting an r.m.s. jitter of 0.005 pixels in the x-axis direction and 0.0026 pixels in the y-axis direction. We found a small inverse ramp in the light curves, which settled down after the first 2,000 exposures, which we discarded. We fit the light curves with the batman<sup>56</sup> transit model along with a linear baseline and a second-order jitter detrending polynomial of x and y detector position as described by ref. <sup>38</sup>, which are present in the spectrophotometry at the 53 ± 2-ppm level in the x direction and at the 140 ± 3-ppm level in the y direction. We applied a fixed

quadratic limb-darkening law using the three-dimensional models<sup>61</sup> computed using the methods of ref. <sup>62</sup> from ExoTiC-LD<sup>59,60</sup>. In fitting the 3 µm to 5.5 µm white-light curve, we allowed the semi-major axis in units of stellar radii $a/R$, inclination *i* and central transit time $T_0$ to freely vary along with the transit depth and systematics model. We used the Markov chain Monte Carlo sampling routine emcee<sup>63</sup> to find the best-fit parameters and measure the posterior distribution. We find the 3–5.5 µm white-light curve has a transit depth of 2.1368 ± 0.0014% and achieves 808-ppm scatter in the residuals. This is within 6% of the expected noise limit of 758 ppm as calculated by the JWST Calibration pipeline, with the scatter of the residuals decreasing to below 40 ppm upon binning with no detectable red noise. We fit each spectroscopic light curve shown in Fig. 1 with the same astrophysical and systematic models as the white-light curve, except fixing the system parameters ($a/R$, *i* and $T_0$). The transmission spectral light-curve residuals for each bin are typically within 5% of pipeline error or better, also with no detectable red noise.

## Data–model comparison

We compared the extracted transmission spectral data to a suite of one-dimensional self-consistent radiative–convective–thermochemical equilibrium model atmospheres (see, for example, refs. <sup>64,65</sup> for a general description of such models) described below. In short, all models are able to fit the 3–5.5 µm spectra consistently (with $X^2/N_{data} < 1.4$, where $N_{data}$ is the number of spectral data points) with a 10-times-solar metal enrichment and varying grey cloud opacity for their single best estimate. Comparisons of the model fits from each grid are shown in Extended Data Fig. 1. For additional parameters within the grid (for example, carbon-to-oxygen ratio (C/O) and heat redistribution), there is some discrepancy between each model grid’s single best estimate values. Additional Bayesian analyses are needed to rigorously quantify confidence intervals on atmospheric properties of interest, which is beyond the scope of this work. Future works will focus on modelling that includes the effects of disequilibrium chemistry, aerosol microphysics and three-dimensional circulation effects. We assumed the following parameters in the modelling: stellar effective temperature, $T_{\text{eff}} = 5,512$ K, stellar radius = 0.932 $R_\odot$, planet mass = 0.281 $M_\oplus$, planet radius = 1.279 $R_j$ and planet orbital semi-major axis = 0.04828 AU.

## SCCHIMERA

This framework was first described in refs. <sup>66,67</sup>, with the most recent updates, methods and opacity sources described in ref. <sup>68</sup>. We compute the converged atmospheric structure (temperature–pressure and thermochemical equilibrium gas mixing ratio profiles) over a grid of atmospheric metallicity ([M/H], where the square brackets indicate $\log_{10}$ enrichment relative to solar<sup>43</sup>) spaced at 0.25-dex intervals between 0 and 2.25 (1- to 175-times solar) and C/O at values of 0.20, 0.35, 0.55, 0.70, 0.75 and 0.80. We assume full day-to-night temperature redistribution<sup>69</sup> as planets in this temperature regime are unlikely to possess strong day-to-night temperature contrast<sup>70,71</sup>. We then compute transmission spectra<sup>72,73</sup> from these converged atmospheric structures. To match the models to the data, the DYNESTY<sup>74</sup> fitting routine is used to search for the optimal [M/H] and C/O (via nearest neighbour) while simultaneously adjusting the 1-bar planetary radius (which controls the absolute transit depth) and an opaque, grey, uniformly vertically distributed, cloud opacity ($\kappa_{\text{cld}}$). The optimal model resulting from this process is [M/H] = +1.0, C/O = 0.35 and $\log_{10}\kappa_{\text{cld}} = -2.15 \text{ cm}^2 \text{ g}^{-1}$. The metallicity and cloud opacity are primarily driven by the strength of the 4.3-µm $CO_2$ feature and lack of methane ($CH_4$) absorption near 3.3 µm. This result is what is shown in the main text (Fig. 3), which also illustrates the relative contribution of the key opacity sources ($H_2O$ (refs. <sup>75,76</sup>), CO (refs. <sup>77,78</sup>), $CO_2$ (refs. <sup>79,80</sup>), $H_2S$ (refs. <sup>78,81</sup>) and $CH_4$ (refs. <sup>78,82</sup>)) to the overall spectral shape. Extended Data Fig. 2 shows the atmospheric structure (temperature profile and gas mixing ratio profiles) for this best-fit model.
## PICASO

The core one-dimensional radiative-convective model is based on the legacy 'Extrasolar Giant Planet' code described in refs. ⁶⁹,⁸⁰,⁸³ and since updated and modernized within the PICASO⁸⁴ framework described in ref. ⁸⁵ (PICASO 3.0). The PICASO 3.0 model uses gaseous opacities created from the references listed in ref. ⁸⁰. The grid of PICASO models contains metallicity points at 0.1-, 0.3-, 1-, 3-, 10-, 30-, 50- and 100-times solar; C/O at 0.23, 0.46, 0.69 and 0.92; and also assumes full day-night heat redistribution. The clouds are modelled using the Virga⁸⁶ implementation of the Eddysed⁸⁷ framework, which requires a vertical mixing coefficient, $K_{zz}$ (constant with altitude; $\log_{10}K_{zz} = 5, 7, 9$ and 11 (cgs units)) and a vertically constant sedimentation parameter ($f_{sed} = 0.6, 1, 3, 6$ and 10), with optical/material properties for clouds thought to exist at WASP-39b's pressures and temperatures (Na₂S, Mns and MgSiO₃). The $f_{sed}$ parameter controls the vertical extent of the cloud, and $K_{zz}$ and $f_{sed}$ together control the mean droplet sizes with altitude in the atmosphere. A $X^2$ grid search along the described dimensions is performed to identify the best fit. Within this grid, the nominal best fit ($X^2/N_{data} = 1.34$) is 10-times-solar metallicity, a subsolar C/O (0.23), with an extended large droplet cloud ($f_{sed} = 0.6, \log_{10}K_{zz} = 9$) that produces a grey continuum over these wavelengths, consistent with the ScCHIMERA results above.

## ATMO

The ATMO radiative-convective-thermochemical equilibrium solver is described in refs. ⁸⁸⁻⁹¹. This grid consists of model transmission spectra for four different day-night energy redistribution factors (0.25, 0.5, 0.75 and 1.0, where 0.5 is 'full' and 1.0 is 'dayside only'), six metallicities (0.1-, 1-, 10-, 50-, 100- and 200-times solar), six C/O ratios (0.35, 0.55, 0.70, 0.75, 1.0 and 1.5), two haze factors (no haze and 10-times multi-gas Rayleigh scattering) and four grey cloud factors (no cloud, 0.5-, 1- and 5-times the strength of H₂ Rayleigh scattering at 350 nm between 1-mbar and 50-mbar pressure levels). Each model transmission spectrum from the grid is binned to the same resolution as that of the observations to compute $X^2$, with a (wavelength independent) transit depth offset as the free parameter. Within this grid, we find a best-fit model ($X^2/N_{data} = 1.39$) spectrum arising from a redistribution factor of 0.75 (slightly hotter than a full day-night redistribution would produce), a metallicity of 10-times solar, a super-solar C/O ratio of 0.7, a haze factor of 10 and a cloud factor of 5.

## PHOENIX

This model originates from the PHOENIX stellar atmosphere code⁹² adapted for exoplanets⁹³ with additional modelling and opacity updates described in refs. ⁹⁴,⁹⁵. The model grid is computed for an array of irradiation temperatures (920 K, 1,020 K, 1,120 K and 1,220 K), metallicities (0.1-, 1-, 10- and 100-times solar) and C/O (0.3, 0.54, 0.7 and 1.0), and includes a sampling of opaque, grey clouds at specified cloud-top pressures. The nominal best-fit model ($X^2/N_{data} = 1.32$) from this grid set-up results in a 10-times-solar metallicity and subsolar C/O (0.3) atmosphere with a cloud-top pressure of 0.3 mbar.

## Quantifying feature detection significance

We quantified the detection significance⁹⁶ of CO₂ with the following steps. The best-fit grid model without CO₂ (that is, the 'no CO₂' black curve shown in Fig. 3) is first subtracted from the data, leaving behind a strong residual feature due to CO₂ (Extended Data Fig. 3). The peak per-spectral-bin mean signal-to-noise ratio of this residual feature is about $10\sigma$. To utilize the full line/band shape we then fit the residual peak with (1) a four-parameter Gaussian model (centroid, amplitude, width and vertical offset), shown as red curves in Extended Data Fig. 3, and (2) a 'no feature' constant using a nested sampling routine⁷⁴. The Bayesian evidence between the Gaussian model and constant model were then used to compute a Bayes factor, *B*, and corresponding

detection significance⁹⁷. For the CO₂ residual feature, $\ln(B)$ is 340.5, which equates to a 26.2σ detection. From this analysis, we conclude that the CO₂ feature is robustly detected.

On inspecting Figs. 2 and 3, there appears to be a feature near 4.0 µm (just short of the major CO₂ feature). We repeated the same analysis as above, but instead compared the Bayesian evidence from a two-component Gaussian model fit (to accommodate for both the CO₂ feature and the unknown absorber) to that of the single component Gaussian model fit above. On doing so, we find $\ln(B) = 0.98$, which equates to a 2σ significance. Restricting the prior range for the second Gaussian to be localized near the 4-µm feature boosts the significance to 2.3σ. Future analyses will focus on the nature of this feature and more rigorous quantification via nested Bayesian model comparison within atmospheric retrieval frameworks (for example, ref. ³⁴).

## Data availability

The data used in this paper are associated with JWST programme ERS 1366 (observation #4) and are available from the Mikulski Archive for Space Telescopes (https://mast.stsci.edu). Science data processing version (SDP_VER) 2022_2a generated the uncalibrated data that we downloaded from MAST. We used JWST calibration software version (CAL_VER) 1.5.3 with modifications described in the text. We used calibration reference data from context (CRDS_CTX) 0916, except as noted in the text. All the data and models presented in this publication can be found at https://doi.org/10.5281/zenodo.6959427. Source data are provided with this paper.

## Code availability

The codes used in this publication to extract, reduce and analyse the data are as follows: STScI JWST Calibration pipeline³⁷ (https://github.com/spacetelescope/jwst), tshirt⁴⁰, Eureka!³⁹ (https://eurekadocs.readthedocs.io/en/latest/), Tiberius²¹,<fnref n="56" />,<fnref n="57" /> and FIREFly³⁸. In addition, these made use of Exoplanet<fnref n="51" /> (https://docs.exoplanet codes/en/ latest/), Pymc³⁵ (https://docs.pymc.io/en/v3/index.html), ExoTEP<fnref n="53" />⁻<fnref n="55" />, Batman<fnref n="56" /> (http://kreidberg.github.io/batman/docs/html/index.html), ExoTiC-ISM<fnref n="59" /> (https://github.com/Exo-TiC/ExoTiC-ISM), ExoTiC-LD⁶⁰ (https://exotic-ld.readthedocs.io/en/latest/), Emcee⁶³ (https://emcee.readthedocs.io/en/stable/), DYNESTY⁷⁴ (https://dynesty.readthedocs.io/en/stable/index.html) and chromatic (https://zkbt.github.io/chro- matic/), each of which use the standard Python libraries scipy⁹⁸, numpy⁹⁹, astropy¹⁰⁰,¹⁰¹ and matplotlib¹⁰². The atmospheric models used to fit the data are as follows: PICASO⁸⁴ (https://natashabatalha.github.io/picaso/), Virga⁸⁶ (https://natashabatalha.github.io/virga/), ScCHIMERA⁶⁸ (https://github.com/mrline/CHIMERA), ATMO⁸⁸⁻⁹¹ and PHOENIX⁹⁴.

<footnote n="49">49. Himes, M. D. & Harrington, J. On the dayside atmosphere of WASP-12b. Astrophys. J. **931**, 86 (2022).</footnote>

<footnote n="50">50. Schlawin, E. et al. JWST noise floor. II. Systematic error sources in JWST NIRCam time series. Astron. J. **161**, 115 (2021).</footnote>

<footnote n="51">51. Foreman-Mackey, D. et al. exoplanet: gradient-based probabilistic inference for exoplanet data & other astronomical time series. J. Open Source Softw. **6**, 3285 (2021).</footnote>

<footnote n="52">52. Salvatier, J., Wiecki, T. V. & Fonnesbeck, C. PyMC3: python probabilistic programming framework. Astrophysics Source Code Library ascl:1610.016 (2016).</footnote>

<footnote n="53">53. Benneke, B. et al. Spitzer observations confirm and rescue the habitable-zone super-Earth K2-18b for future characterization. Astrophys. J. **834**, 187 (2017).</footnote>

<footnote n="54">54. Benneke, B. et al. Water vapor and clouds on the habitable-zone sub-Neptune exoplanet K2-18b. Astrophys. J. Lett. **887**, L14 (2019).</footnote>

<footnote n="55">55. Benneke, B. et al. A sub-Neptune exoplanet with a low-metallicity methane-depleted atmosphere and Mie-scattering clouds. Nat. Astron. **3**, 813–821 (2019).</footnote>

<footnote n="56">56. Kreidberg, L., batman: basic transit model calculation in Python. Publ. Astron. Soc. Pac. **127**, 1161–1165 (2015).</footnote>

<footnote n="57">57. Kirk, J. et al. LRG-BEASTS III: ground-based transmission spectrum of the gas giant orbiting the cool dwarf WASP-80. Mon. Not. R. Astron. Soc. **474**, 876–885 (2018).</footnote>

<footnote n="58">58. Kirk, J. et al. ACCESS and LRG-BEASTS: a precise new optical transmission spectrum of the ultrahot Jupiter WASP-103b. Astron. J. **162**, 34 (2021).</footnote>

<footnote n="59">59. Laginja, I. & Wakeford, H. ExoTiC-ISM: a Python package for marginalised exoplanet transit parameters across a grid of systematic instrument models. J Open Source Softw **5**, 2281 (2020).</footnote>
## PICASO

The core one-dimensional radiative-convective model is based on the legacy 'Extrasolar Giant Planet' code described in refs. ⁶⁹,⁸⁰,⁸³ and since updated and modernized within the PICASO⁸⁴ framework described in ref. ⁸⁵ (PICASO 3.0). The PICASO 3.0 model uses gaseous opacities created from the references listed in ref. ⁸⁰. The grid of PICASO models contains metallicity points at 0.1-, 0.3-, 1-, 3-, 10-, 30-, 50- and 100-times solar; C/O at 0.23, 0.46, 0.69 and 0.92; and also assumes full day-night heat redistribution. The clouds are modelled using the Virga⁸⁶ implementation of the Eddysed⁸⁷ framework, which requires a vertical mixing coefficient, $K_{zz}$ (constant with altitude; $\log_{10}K_{zz} = 5, 7, 9$ and 11 (cgs units)) and a vertically constant sedimentation parameter ($f_{sed} = 0.6, 1, 3, 6$ and 10), with optical/material properties for clouds thought to exist at WASP-39b's pressures and temperatures (Na₂S, Mns and MgSiO₃). The $f_{sed}$ parameter controls the vertical extent of the cloud, and $K_{zz}$ and $f_{sed}$ together control the mean droplet sizes with altitude in the atmosphere. A $X^2$ grid search along the described dimensions is performed to identify the best fit. Within this grid, the nominal best fit ($X^2/N_{data} = 1.34$) is 10-times-solar metallicity, a subsolar C/O (0.23), with an extended large droplet cloud ($f_{sed} = 0.6, \log_{10}K_{zz} = 9$) that produces a grey continuum over these wavelengths, consistent with the ScCHIMERA results above.

## ATMO

The ATMO radiative-convective-thermochemical equilibrium solver is described in refs. ⁸⁸⁻⁹¹. This grid consists of model transmission spectra for four different day-night energy redistribution factors (0.25, 0.5, 0.75 and 1.0, where 0.5 is 'full' and 1.0 is 'dayside only'), six metallicities (0.1-, 1-, 10-, 50-, 100- and 200-times solar), six C/O ratios (0.35, 0.55, 0.70, 0.75, 1.0 and 1.5), two haze factors (no haze and 10-times multi-gas Rayleigh scattering) and four grey cloud factors (no cloud, 0.5-, 1- and 5-times the strength of H₂ Rayleigh scattering at 350 nm between 1-mbar and 50-mbar pressure levels). Each model transmission spectrum from the grid is binned to the same resolution as that of the observations to compute $X^2$, with a (wavelength independent) transit depth offset as the free parameter. Within this grid, we find a best-fit model ($X^2/N_{data} = 1.39$) spectrum arising from a redistribution factor of 0.75 (slightly hotter than a full day-night redistribution would produce), a metallicity of 10-times solar, a super-solar C/O ratio of 0.7, a haze factor of 10 and a cloud factor of 5.

## PHOENIX

This model originates from the PHOENIX stellar atmosphere code⁹² adapted for exoplanets⁹³ with additional modelling and opacity updates described in refs. ⁹⁴,⁹⁵. The model grid is computed for an array of irradiation temperatures (920 K, 1,020 K, 1,120 K and 1,220 K), metallicities (0.1-, 1-, 10- and 100-times solar) and C/O (0.3, 0.54, 0.7 and 1.0), and includes a sampling of opaque, grey clouds at specified cloud-top pressures. The nominal best-fit model ($X^2/N_{data} = 1.32$) from this grid set-up results in a 10-times-solar metallicity and subsolar C/O (0.3) atmosphere with a cloud-top pressure of 0.3 mbar.

## Quantifying feature detection significance

We quantified the detection significance⁹⁶ of CO₂ with the following steps. The best-fit grid model without CO₂ (that is, the 'no CO₂' black curve shown in Fig. 3) is first subtracted from the data, leaving behind a strong residual feature due to CO₂ (Extended Data Fig. 3). The peak per-spectral-bin mean signal-to-noise ratio of this residual feature is about $10\sigma$. To utilize the full line/band shape we then fit the residual peak with (1) a four-parameter Gaussian model (centroid, amplitude, width and vertical offset), shown as red curves in Extended Data Fig. 3, and (2) a 'no feature' constant using a nested sampling routine⁷⁴. The Bayesian evidence between the Gaussian model and constant model were then used to compute a Bayes factor, *B*, and corresponding

detection significance⁹⁷. For the CO₂ residual feature, $\ln(B)$ is 340.5, which equates to a 26.2σ detection. From this analysis, we conclude that the CO₂ feature is robustly detected.

On inspecting Figs. 2 and 3, there appears to be a feature near 4.0 µm (just short of the major CO₂ feature). We repeated the same analysis as above, but instead compared the Bayesian evidence from a two-component Gaussian model fit (to accommodate for both the CO₂ feature and the unknown absorber) to that of the single component Gaussian model fit above. On doing so, we find $\ln(B) = 0.98$, which equates to a 2σ significance. Restricting the prior range for the second Gaussian to be localized near the 4-µm feature boosts the significance to 2.3σ. Future analyses will focus on the nature of this feature and more rigorous quantification via nested Bayesian model comparison within atmospheric retrieval frameworks (for example, ref. ³⁴).

## Data availability

The data used in this paper are associated with JWST programme ERS 1366 (observation #4) and are available from the Mikulski Archive for Space Telescopes (https://mast.stsci.edu). Science data processing version (SDP_VER) 2022_2a generated the uncalibrated data that we downloaded from MAST. We used JWST calibration software version (CAL_VER) 1.5.3 with modifications described in the text. We used calibration reference data from context (CRDS_CTX) 0916, except as noted in the text. All the data and models presented in this publication can be found at https://doi.org/10.5281/zenodo.6959427. Source data are provided with this paper.

## Code availability

The codes used in this publication to extract, reduce and analyse the data are as follows: STScI JWST Calibration pipeline³⁷ (https://github.com/spacetelescope/jwst), tshirt⁴⁰, Eureka!³⁹ (https://eurekadocs.readthedocs.io/en/latest/), Tiberius²¹,<fnref n="56" />,<fnref n="57" /> and FIREFly³⁸. In addition, these made use of Exoplanet<fnref n="51" /> (https://docs.exoplanet codes/en/ latest/), Pymc³⁵ (https://docs.pymc.io/en/v3/index.html), ExoTEP<fnref n="53" />⁻<fnref n="55" />, Batman<fnref n="56" /> (http://kreidberg.github.io/batman/docs/html/index.html), ExoTiC-ISM<fnref n="59" /> (https://github.com/Exo-TiC/ExoTiC-ISM), ExoTiC-LD⁶⁰ (https://exotic-ld.readthedocs.io/en/latest/), Emcee⁶³ (https://emcee.readthedocs.io/en/stable/), DYNESTY⁷⁴ (https://dynesty.readthedocs.io/en/stable/index.html) and chromatic (https://zkbt.github.io/chro- matic/), each of which use the standard Python libraries scipy⁹⁸, numpy⁹⁹, astropy¹⁰⁰,¹⁰¹ and matplotlib¹⁰². The atmospheric models used to fit the data are as follows: PICASO⁸⁴ (https://natashabatalha.github.io/picaso/), Virga⁸⁶ (https://natashabatalha.github.io/virga/), ScCHIMERA⁶⁸ (https://github.com/mrline/CHIMERA), ATMO⁸⁸⁻⁹¹ and PHOENIX⁹⁴.

<footnote n="49">49. Himes, M. D. & Harrington, J. On the dayside atmosphere of WASP-12b. Astrophys. J. **931**, 86 (2022).</footnote>

<footnote n="50">50. Schlawin, E. et al. JWST noise floor. II. Systematic error sources in JWST NIRCam time series. Astron. J. **161**, 115 (2021).</footnote>

<footnote n="51">51. Foreman-Mackey, D. et al. exoplanet: gradient-based probabilistic inference for exoplanet data & other astronomical time series. J. Open Source Softw. **6**, 3285 (2021).</footnote>

<footnote n="52">52. Salvatier, J., Wiecki, T. V. & Fonnesbeck, C. PyMC3: python probabilistic programming framework. Astrophysics Source Code Library ascl:1610.016 (2016).</footnote>

<footnote n="53">53. Benneke, B. et al. Spitzer observations confirm and rescue the habitable-zone super-Earth K2-18b for future characterization. Astrophys. J. **834**, 187 (2017).</footnote>

<footnote n="54">54. Benneke, B. et al. Water vapor and clouds on the habitable-zone sub-Neptune exoplanet K2-18b. Astrophys. J. Lett. **887**, L14 (2019).</footnote>

<footnote n="55">55. Benneke, B. et al. A sub-Neptune exoplanet with a low-metallicity methane-depleted atmosphere and Mie-scattering clouds. Nat. Astron. **3**, 813–821 (2019).</footnote>

<footnote n="56">56. Kreidberg, L., batman: basic transit model calculation in Python. Publ. Astron. Soc. Pac. **127**, 1161–1165 (2015).</footnote>

<footnote n="57">57. Kirk, J. et al. LRG-BEASTS III: ground-based transmission spectrum of the gas giant orbiting the cool dwarf WASP-80. Mon. Not. R. Astron. Soc. **474**, 876–885 (2018).</footnote>

<footnote n="58">58. Kirk, J. et al. ACCESS and LRG-BEASTS: a precise new optical transmission spectrum of the ultrahot Jupiter WASP-103b. Astron. J. **162**, 34 (2021).</footnote>

<footnote n="59">59. Laginja, I. & Wakeford, H. ExoTiC-ISM: a Python package for marginalised exoplanet transit parameters across a grid of systematic instrument models. J Open Source Softw **5**, 2281 (2020).</footnote>
60. Wakeford, H. R. & Grant, D. Exo-TIC/ExoTIC-LD: ExoTIC-LD v2.1 Zenodo Release. Zenodo https://doi.org/10.5281/zenodo.6809899 (2022).

61. Magic, Z., Chiavassa, A., Collet, R. & Asplund, M. The Stagger-grid: a grid of 3D stellar atmosphere models. IV Limb darkening coefficients. *Astron. Astrophys.* **573**, A90 (2015).

62. Sing, D. K. Stellar limb-darkening coefficients for CoRot and Kepler. *Astron. Astrophys.* **510**, A21 (2010).

63. Foreman-Mackey, D. et al. emcee v3: a Python ensemble sampling toolkit for affine-invariant MCMC. *J. Open Source Softw.* **4**, 1864 (2019).

64. Marley, M. S. & Robinson, T. D. On the cool side: modeling the atmospheres of brown dwarfs and giant planets. *Ann. Rev. Astron. Astrophys.* **53**, 279–323 (2015).

65. Hubeny, I. Model atmospheres of sub-stellar mass objects. *Mon. Not. R. Astron. Soc.* **469**, 841–869 (2017).

66. Piskorz, D. et al. Ground- and space-based detection of the thermal emission spectrum of the transiting hot Jupiter KELT-2Ab. *Astron. J.* **156**, 133 (2018).

67. Arcangeli, J. et al. H' opacity and water dissociation in the dayside atmosphere of the very hot gas giant WASP-18b. *Astrophys. J. Lett.* **855**, L30 (2018).

68. Mansfield, M. et al. A unique hot Jupiter spectral sequence with evidence for compositional diversity. *Nat. Astron.* **5**, 1224–1232 (2021).

69. Fortney, J. J., Marley, M. S., Lodders, K., Saumon, D. & Freedman, R. Comparative planetary atmospheres: models of TrES-1 and HD 209458b. *Astrophys. J. Lett.* **627**, L69–L72 (2005).

70. Perez-Becker, D. & Showman, A. P. Atmospheric heat redistribution on hot Jupiters. *Astrophys. J.* **776**, 134 (2013).

71. Zhang, X. Atmospheric regimes and trends on exoplanets and brown dwarfs. *Res. Astron. Astrophys.* **20**, 099 (2020).

72. Mai, C. & Line, M. R. Exploring exoplanet cloud assumptions in JWST transmission spectra. *Astrophys. J.* **883**, 144 (2019).

73. Iyer, A. R. & Line, M. R. The influence of stellar contamination on the interpretation of near-infrared transmission spectra of sub-Neptune worlds around M-dwarfs. *Astrophys. J.* **889**, 78 (2020).

74. Speagle, J. S. DYNESTY: a dynamic nested sampling package for estimating Bayesian posteriors and evidences. *Mon. Not. R. Astron. Soc.* **493**, 3132–3158 (2020).

75. Polyansky, O. L. et al. ExoMol molecular line lists XXX: a complete high-accuracy line list for water. *Mon. Not. R. Astron. Soc.* **480**, 2597–2608 (2018).

76. Gharib-Nezhad, E. et al. EXOPLINES: molecular absorption cross-section database for brown dwarf and giant exoplanet atmospheres. *Astrophys. J. Suppl. Ser.* **254**, 34 (2021).

77. Li, G. et al. Rovibrational line lists for nine isotopologues of the CO molecule in the X'Σ⁺ ground electronic state. *Astrophys. J. Suppl. Ser.* **216**, 15 (2015).

78. Grimm, S. L. et al. HELIOS-K 2.0 opacity calculator and open-source opacity database for exoplanetary atmospheres. *Astrophys. J. Suppl. Ser.* **253**, 30 (2021).

79. Huang, X., Gamache, R. R., Freedman, R. S., Schwenke, D. W. & Lee, T. J. Reliable infrared line lists for 13 CO₂ isotopologues up to E'=18,000 cm⁻¹ and 1500 K, with line shape parameters. *J. Quant. Spectrosc. Radiat. Transf.* **147**, 134–144 (2014).

80. Marley, M. S. et al. The Sonora brown dwarf atmosphere and evolution models. I. Model description and application to cloudless atmospheres in rainout chemical equilibrium. *Astrophys. J.* **920**, 85 (2021).

81. Azzam, A. A., Tennyson, J., Yurchenko, S. N. & Naumenko, O. V. ExoMol molecular line lists—XVI. The rotation–vibration spectrum of hot H₂S. *Mon. Not. R. Astron. Soc.* **460**, 4063–4074 (2016).

82. Hargreaves, R. J. et al. An accurate, extensive, and practical line list of methane for the HITEMP database. *Astrophys. J. Suppl. Ser.* **247**, 55 (2020).

83. Marley, M. S. & McKay, C. P. Thermal structure of Uranus' atmosphere. *Icarus* **138**, 268–286 (1999).

84. Batalha, N. E., Marley, M. S., Lewis, N. K. & Fortney, J. J. Exoplanet reflected-light spectroscopy with PICASO. *Astrophys. J.* **878**, 70 (2019).

85. Mukherjee, S., Batalha, N. E., Fortney, J. J. & Marley, M. S. PICASO 3.0: a one-dimensional climate model for giant planets and brown dwarfs. Preprint at https://arXiv.org/ abs/2208.07836 (2022).

86. Rooney, C. M., Batalha, N. E., Gao, P. & Marley, M. S. A new sedimentation model for greater cloud diversity in giant exoplanets and brown dwarfs. *Astrophys. J.* **925**, 33 (2022).

87. Ackerman, A. S. & Marley, M. S. Precipitating condensation clouds in substellar atmospheres. *Astrophys. J.* **556**, 872 (2001).

88. Tremblin, P. et al. Fingering convection and cloudless models for cool brown dwarf atmospheres. *Astrophys. J.* **804**, L17 (2015).

89. Drummond, B. et al. The effects of consistent chemical kinetics calculations on the pressure–temperature profiles and emission spectra of hot Jupiters. *Astron. Astrophys.* **594**, A69 (2016).

90. Goyal, J. M. et al. A library of ATMO forward model transmission spectra for hot Jupiter exoplanets. *Mon. Not. R. Astron. Soc.* **474**, 5158–5185 (2018).

91. Goyal, J. M. et al. A library of self-consistent simulated exoplanet atmospheres. *Mon. Not. R. Astron. Soc.* **498**, 4680–4704 (2020).

92. Hauschildt, P. H., Allard, F. & Baron, E. The NextGen Model atmosphere grid for 3000 ≤ T<sub>eff</sub> ≤ 10,000 K. *Astrophys. J.* **512**, 377 (1999).

93. Barman, T. S., Hauschildt, P. H. & Allard, F. Irradiated planets. *Astrophys. J.* **556**, 885 (2001).

94. Lothringer, J. D. & Barman, T. The PHOENIX exoplanet retrieval algorithm and using H' opacity as a probe in ultrahot Jupiters. *Astron. J.* **159**, 289 (2020).

95. Lothringer, J. D. et al. New window into planet formation and migration: refractory-to-volatile elemental ratios in ultra-hot Jupiters. *Astrophys. J.* **914**, 12 (2021).

96. Gregory, P. C. (ed.) *Bayesian Logical Data Analysis for the Physical Sciences: A Comparative Approach with 'Mathematica' Support* (Cambridge Univ. Pres, 2005).

97. Trotta, R. Bayes in the sky: Bayesian inference and model selection in cosmology. *Contemp. Phys.* **49**, 71–104 (2008).

98. Virtanen, P. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. *Nat. Methods* **17**, 261–272 (2020).

99. Harris, C. R. et al. Array programming with NumPy. *Nature* **585**, 357–362 (2020).

100. The Astropy Collaboration Astropy: a community Python package for astronomy. *Astron. Astrophys.* **558**, A33 (2013).

101. The Astropy Collaboration The Astropy Project: building an open-science project and status of the v2.0 core package. *Astron. J.* **156**, 123 (2018).

102. Hunter, J. D. Matplotlib: a 2D graphics environment. *Comput. Sci. Eng.* **9**, 90–95 (2007).

**Acknowledgements** This work is based on observations made with the NASA/ESA/CSA James Webb Space Telescope. The data were obtained from the Mikulski Archive for Space Telescopes at the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127 for JWST. These observations are associated with programme JWST-ERS-01366. Support for programme JWST-ERS-01366 was provided by NASA through a grant from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127. The results reported herein benefited during the design phase from collaborations and/or information exchange within NASA's Nexus for Exoplanet System Science (NExSS) research coordination network sponsored by NASA's Science Mission Directorate. N.M.B. acknowledges funding from NASA's Interdisciplinary Consortia for Astrobiology Research (NNH19ZDA001N-ICAR) under award number 19-ICAR19-2-0041.

**Author contributions** N.M.B., J.L.B. and K.B.S. provided overall programme leadership and management. D.K.S., E.M.-R.K., H.R.W., I.J.M.C., J.L.B., K.B.S., L.K., M.L.-M., M.R.L., N.M.B., V.P. and Z.K.B.-T. made significant contributions to the design of the programme. K.B.S. generated the observing plan with input from the team. E.S., N.E. and T.G.B. provided instrument expertise. B.B., E.M.-R.K., H.R.W., I.J.M.C., J.L.B., L.K., M.L.-M., M.R.L., N.M.B. and Z.K.B.-T. led or co-led working groups and/or contributed to significant strategic planning efforts like the design and implementation of the pre-launch Data Challenges. A.L.C., D.K.S., E.S., N.E., N.P.G., T.G.B. and V.P. generated simulated data for pre-launch testing of methods. A.L.C., A.D.F., C.P., E.-M.A., E.S., J.K., L.A., T.J.B. and Z.R. contributed to the development of data analysis pipelines and/or provided the data analysis products used in this analysis, reduced the data, modelled the light curves, and produced the planetary spectrum. J.M.G., J.D.L., K.O., M.R.L., N.E.B., S.M. and S.E.M. generated theoretical model grids for comparison with data. A.L.C., D.K.S., E.S., H.R.W., J.K., J.J.F., J.M.G., J.L.B., J.D.L., K.B.S., K.O., M.R.L., N.E.B., N.M.B., S.M., S.E.M., Z.K.B.-T. and Z.R. contributed significantly to the writing of this manuscript. E.-M.A., E.S., M.R.L. and Z.K.B.-T. generated figures for this manuscript. Over 100 of the co-authors participated in the design of this programme and contributed to the ERS observing proposal. Nearly all co-authors participated in pre-launch working groups and programme events. Nearly all authors provided scientific and technical input on the manuscript.

**Competing interests** The authors declare no competing interests.

**Additional information**

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41586-022-05269-w.

**Correspondence and requests for materials** should be addressed to Natalie M. Batalha.

**Peer review information** Nature thanks Masahiro Ikoma and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

**Reprints and permissions information** is available at http://www.nature.com/reprints.
60. Wakeford, H. R. & Grant, D. Exo-TIC/ExoTIC-LD: ExoTIC-LD v2.1 Zenodo Release. Zenodo https://doi.org/10.5281/zenodo.6809899 (2022).

61. Magic, Z., Chiavassa, A., Collet, R. & Asplund, M. The Stagger-grid: a grid of 3D stellar atmosphere models. IV Limb darkening coefficients. *Astron. Astrophys.* **573**, A90 (2015).

62. Sing, D. K. Stellar limb-darkening coefficients for CoRot and Kepler. *Astron. Astrophys.* **510**, A21 (2010).

63. Foreman-Mackey, D. et al. emcee v3: a Python ensemble sampling toolkit for affine-invariant MCMC. *J. Open Source Softw.* **4**, 1864 (2019).

64. Marley, M. S. & Robinson, T. D. On the cool side: modeling the atmospheres of brown dwarfs and giant planets. *Ann. Rev. Astron. Astrophys.* **53**, 279–323 (2015).

65. Hubeny, I. Model atmospheres of sub-stellar mass objects. *Mon. Not. R. Astron. Soc.* **469**, 841–869 (2017).

66. Piskorz, D. et al. Ground- and space-based detection of the thermal emission spectrum of the transiting hot Jupiter KELT-2Ab. *Astron. J.* **156**, 133 (2018).

67. Arcangeli, J. et al. H' opacity and water dissociation in the dayside atmosphere of the very hot gas giant WASP-18b. *Astrophys. J. Lett.* **855**, L30 (2018).

68. Mansfield, M. et al. A unique hot Jupiter spectral sequence with evidence for compositional diversity. *Nat. Astron.* **5**, 1224–1232 (2021).

69. Fortney, J. J., Marley, M. S., Lodders, K., Saumon, D. & Freedman, R. Comparative planetary atmospheres: models of TrES-1 and HD 209458b. *Astrophys. J. Lett.* **627**, L69–L72 (2005).

70. Perez-Becker, D. & Showman, A. P. Atmospheric heat redistribution on hot Jupiters. *Astrophys. J.* **776**, 134 (2013).

71. Zhang, X. Atmospheric regimes and trends on exoplanets and brown dwarfs. *Res. Astron. Astrophys.* **20**, 099 (2020).

72. Mai, C. & Line, M. R. Exploring exoplanet cloud assumptions in JWST transmission spectra. *Astrophys. J.* **883**, 144 (2019).

73. Iyer, A. R. & Line, M. R. The influence of stellar contamination on the interpretation of near-infrared transmission spectra of sub-Neptune worlds around M-dwarfs. *Astrophys. J.* **889**, 78 (2020).

74. Speagle, J. S. DYNESTY: a dynamic nested sampling package for estimating Bayesian posteriors and evidences. *Mon. Not. R. Astron. Soc.* **493**, 3132–3158 (2020).

75. Polyansky, O. L. et al. ExoMol molecular line lists XXX: a complete high-accuracy line list for water. *Mon. Not. R. Astron. Soc.* **480**, 2597–2608 (2018).

76. Gharib-Nezhad, E. et al. EXOPLINES: molecular absorption cross-section database for brown dwarf and giant exoplanet atmospheres. *Astrophys. J. Suppl. Ser.* **254**, 34 (2021).

77. Li, G. et al. Rovibrational line lists for nine isotopologues of the CO molecule in the X'Σ⁺ ground electronic state. *Astrophys. J. Suppl. Ser.* **216**, 15 (2015).

78. Grimm, S. L. et al. HELIOS-K 2.0 opacity calculator and open-source opacity database for exoplanetary atmospheres. *Astrophys. J. Suppl. Ser.* **253**, 30 (2021).

79. Huang, X., Gamache, R. R., Freedman, R. S., Schwenke, D. W. & Lee, T. J. Reliable infrared line lists for 13 CO₂ isotopologues up to E'=18,000 cm⁻¹ and 1500 K, with line shape parameters. *J. Quant. Spectrosc. Radiat. Transf.* **147**, 134–144 (2014).

80. Marley, M. S. et al. The Sonora brown dwarf atmosphere and evolution models. I. Model description and application to cloudless atmospheres in rainout chemical equilibrium. *Astrophys. J.* **920**, 85 (2021).

81. Azzam, A. A., Tennyson, J., Yurchenko, S. N. & Naumenko, O. V. ExoMol molecular line lists—XVI. The rotation–vibration spectrum of hot H₂S. *Mon. Not. R. Astron. Soc.* **460**, 4063–4074 (2016).

82. Hargreaves, R. J. et al. An accurate, extensive, and practical line list of methane for the HITEMP database. *Astrophys. J. Suppl. Ser.* **247**, 55 (2020).

83. Marley, M. S. & McKay, C. P. Thermal structure of Uranus' atmosphere. *Icarus* **138**, 268–286 (1999).

84. Batalha, N. E., Marley, M. S., Lewis, N. K. & Fortney, J. J. Exoplanet reflected-light spectroscopy with PICASO. *Astrophys. J.* **878**, 70 (2019).

85. Mukherjee, S., Batalha, N. E., Fortney, J. J. & Marley, M. S. PICASO 3.0: a one-dimensional climate model for giant planets and brown dwarfs. Preprint at https://arXiv.org/ abs/2208.07836 (2022).

86. Rooney, C. M., Batalha, N. E., Gao, P. & Marley, M. S. A new sedimentation model for greater cloud diversity in giant exoplanets and brown dwarfs. *Astrophys. J.* **925**, 33 (2022).

87. Ackerman, A. S. & Marley, M. S. Precipitating condensation clouds in substellar atmospheres. *Astrophys. J.* **556**, 872 (2001).

88. Tremblin, P. et al. Fingering convection and cloudless models for cool brown dwarf atmospheres. *Astrophys. J.* **804**, L17 (2015).

89. Drummond, B. et al. The effects of consistent chemical kinetics calculations on the pressure–temperature profiles and emission spectra of hot Jupiters. *Astron. Astrophys.* **594**, A69 (2016).

90. Goyal, J. M. et al. A library of ATMO forward model transmission spectra for hot Jupiter exoplanets. *Mon. Not. R. Astron. Soc.* **474**, 5158–5185 (2018).

91. Goyal, J. M. et al. A library of self-consistent simulated exoplanet atmospheres. *Mon. Not. R. Astron. Soc.* **498**, 4680–4704 (2020).

92. Hauschildt, P. H., Allard, F. & Baron, E. The NextGen Model atmosphere grid for 3000 ≤ T<sub>eff</sub> ≤ 10,000 K. *Astrophys. J.* **512**, 377 (1999).

93. Barman, T. S., Hauschildt, P. H. & Allard, F. Irradiated planets. *Astrophys. J.* **556**, 885 (2001).

94. Lothringer, J. D. & Barman, T. The PHOENIX exoplanet retrieval algorithm and using H' opacity as a probe in ultrahot Jupiters. *Astron. J.* **159**, 289 (2020).

95. Lothringer, J. D. et al. New window into planet formation and migration: refractory-to-volatile elemental ratios in ultra-hot Jupiters. *Astrophys. J.* **914**, 12 (2021).

96. Gregory, P. C. (ed.) *Bayesian Logical Data Analysis for the Physical Sciences: A Comparative Approach with 'Mathematica' Support* (Cambridge Univ. Pres, 2005).

97. Trotta, R. Bayes in the sky: Bayesian inference and model selection in cosmology. *Contemp. Phys.* **49**, 71–104 (2008).

98. Virtanen, P. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. *Nat. Methods* **17**, 261–272 (2020).

99. Harris, C. R. et al. Array programming with NumPy. *Nature* **585**, 357–362 (2020).

100. The Astropy Collaboration Astropy: a community Python package for astronomy. *Astron. Astrophys.* **558**, A33 (2013).

101. The Astropy Collaboration The Astropy Project: building an open-science project and status of the v2.0 core package. *Astron. J.* **156**, 123 (2018).

102. Hunter, J. D. Matplotlib: a 2D graphics environment. *Comput. Sci. Eng.* **9**, 90–95 (2007).

**Acknowledgements** This work is based on observations made with the NASA/ESA/CSA James Webb Space Telescope. The data were obtained from the Mikulski Archive for Space Telescopes at the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127 for JWST. These observations are associated with programme JWST-ERS-01366. Support for programme JWST-ERS-01366 was provided by NASA through a grant from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-03127. The results reported herein benefited during the design phase from collaborations and/or information exchange within NASA's Nexus for Exoplanet System Science (NExSS) research coordination network sponsored by NASA's Science Mission Directorate. N.M.B. acknowledges funding from NASA's Interdisciplinary Consortia for Astrobiology Research (NNH19ZDA001N-ICAR) under award number 19-ICAR19-2-0041.

**Author contributions** N.M.B., J.L.B. and K.B.S. provided overall programme leadership and management. D.K.S., E.M.-R.K., H.R.W., I.J.M.C., J.L.B., K.B.S., L.K., M.L.-M., M.R.L., N.M.B., V.P. and Z.K.B.-T. made significant contributions to the design of the programme. K.B.S. generated the observing plan with input from the team. E.S., N.E. and T.G.B. provided instrument expertise. B.B., E.M.-R.K., H.R.W., I.J.M.C., J.L.B., L.K., M.L.-M., M.R.L., N.M.B. and Z.K.B.-T. led or co-led working groups and/or contributed to significant strategic planning efforts like the design and implementation of the pre-launch Data Challenges. A.L.C., D.K.S., E.S., N.E., N.P.G., T.G.B. and V.P. generated simulated data for pre-launch testing of methods. A.L.C., A.D.F., C.P., E.-M.A., E.S., J.K., L.A., T.J.B. and Z.R. contributed to the development of data analysis pipelines and/or provided the data analysis products used in this analysis, reduced the data, modelled the light curves, and produced the planetary spectrum. J.M.G., J.D.L., K.O., M.R.L., N.E.B., S.M. and S.E.M. generated theoretical model grids for comparison with data. A.L.C., D.K.S., E.S., H.R.W., J.K., J.J.F., J.M.G., J.L.B., J.D.L., K.B.S., K.O., M.R.L., N.E.B., N.M.B., S.M., S.E.M., Z.K.B.-T. and Z.R. contributed significantly to the writing of this manuscript. E.-M.A., E.S., M.R.L. and Z.K.B.-T. generated figures for this manuscript. Over 100 of the co-authors participated in the design of this programme and contributed to the ERS observing proposal. Nearly all co-authors participated in pre-launch working groups and programme events. Nearly all authors provided scientific and technical input on the manuscript.

**Competing interests** The authors declare no competing interests.

**Additional information**

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s41586-022-05269-w.

**Correspondence and requests for materials** should be addressed to Natalie M. Batalha.

**Peer review information** Nature thanks Masahiro Ikoma and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

**Reprints and permissions information** is available at http://www.nature.com/reprints.
<figure><img src="image_6.png" /></figure>

**Extended Data Fig. 1** | Comparison of transmission spectrum modelling results from different codes for WASP-39b. Despite different radiative–convective equilibrium and chemical solvers, treatments of clouds, grid

spacing and grid-fitting approaches, all four grids arrive at the same 10-times solar metallicity point solution. Additionally, all four provide an acceptable fit to the data, with best-fitting $X^2/N_{data} < 1.4$.
<figure><img src="image_9.png" /></figure>

**Extended Data Fig. 1** | Comparison of transmission spectrum modelling results from different codes for WASP-39b. Despite different radiative–convective equilibrium and chemical solvers, treatments of clouds, grid

spacing and grid-fitting approaches, all four grids arrive at the same 10-times solar metallicity point solution. Additionally, all four provide an acceptable fit to the data, with best-fitting $X^2/N_{data} < 1.4$.
<figure><img src="image_7.png" /></figure>

**Extended Data Fig. 2 | Atmospheric structure arising from the best-fit model.** The thick red curve (and corresponding top x axis) shows the resulting 1D radiative–convective equilibrium temperature profile. The dashed lines (and bottom x axis) show the vertical gas mixing ratio profiles under the

assumption of thermochemical equilibrium. These abundances, along with the
absorption cross-sections shown in the bottom panel of Fig. 3, are what control
the relative contributions of each gaseous opacity to the total transmission
spectrum.
<figure><img src="image_10.png" /></figure>

**Extended Data Fig. 2 | Atmospheric structure arising from the best-fit model.** The thick red curve (and corresponding top x axis) shows the resulting 1D radiative–convective equilibrium temperature profile. The dashed lines (and bottom x axis) show the vertical gas mixing ratio profiles under the

assumption of thermochemical equilibrium. These abundances, along with the
absorption cross-sections shown in the bottom panel of Fig. 3, are what control
the relative contributions of each gaseous opacity to the total transmission
spectrum.
<figure><img src="image_8.png" /><figcaption>**Extended Data Fig. 3** | Assessment of the strength of spectral features for WASP-39b. Residual features (blue data points) after subtracting the continuum best model (black ‘no CO₂’ model curve in Fig. 3). A best-fitting</figcaption></figure>

ensemble of a two-component Gaussian model to both the CO₂ feature and the unknown absorber feature (-4 µm) is shown in red.
<figure><img src="image_11.png" /><figcaption>**Extended Data Fig. 3** | Assessment of the strength of spectral features for WASP-39b. Residual features (blue data points) after subtracting the continuum best model (black ‘no CO₂’ model curve in Fig. 3). A best-fitting</figcaption></figure>

ensemble of a two-component Gaussian model to both the CO₂ feature and the unknown absorber feature (-4 µm) is shown in red.