# 15NH3 in the atmosphere of a cool brown dwarf

David Barrado, Paul Mollière, Polychronis Patapis, Michiel Min, Pascal Tremblin, Francisco Ardevol Martinez, Niall Whiteford, Malavika Vasist, Ioannis Argyriou, Matthias Samland, et al.

► To cite this version:

David Barrado, Paul Mollière, Polychronis Patapis, Michiel Min, Pascal Tremblin, et al. 15NH3 in the atmosphere of a cool brown dwarf. Nature, 2023, 624 (7991), pp.263-266. 10.1038/s41586-023-06813-y. hal-04489129

HAL Id: hal-04489129

https://hal.science/hal-04489129v1

Submitted on 28 Nov 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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
¹⁵NH₃ in the atmosphere of a cool brown dwarf

David Barrado<fnref n="1" />,*,†, Paul Mollière<fnref n="2" />,†, Polychronis Patapis<fnref n="3" />,†, Michiel Min<fnref n="4" />, Pascal Tremblin<fnref n="5" />, Fran-
cisco Ardevol Martinez<fnref n="6" />,<fnref n="7" />,<fnref n="8" />, Niall Whiteford<fnref n="9" />, Malavika Vasist<fnref n="10" />, Ioannis Argyriou<fnref n="11" />, Matthias
Samland<fnref n="2" />, Pierre-Olivier Lagage<fnref n="12" />, Leen Decin<fnref n="11" />, Rens Waters<fnref n="13" />,<fnref n="14" />, Thomas Henning<fnref n="2" />, María
Morales-Calderón<fnref n="1" />, Manuel Guedel<fnref n="15" />,<fnref n="2" />,<fnref n="16" />, Bart Vandenbussche<fnref n="11" />, Olivier Absil<fnref n="10" />, Pierre Baudoz¹⁷,
Anthony Boccaletti¹⁷, Jeroen Bouwman<fnref n="2" />, Christophe Cossou¹⁸, Alain Coulais¹⁹,<fnref n="12" />, Nicolas Crouzet²⁰,
René Gastaud²¹, Alistair Glasse²², Adrian M. Glauser<fnref n="3" />, Inga Kamp<fnref n="6" />, Sarah Kendrew²³, Oliver
Krause<fnref n="2" />, Fred Lahuis<fnref n="4" />, Michael Mueller<fnref n="6" />, Göran Olofsson²⁴, John Pye²⁵, Daniel Rouan¹⁷, Pierre
Royer<fnref n="11" />, Silvia Scheithauer<fnref n="2" />, Ingo Waldmann²⁶, Luis Colina<fnref n="1" />, Ewine F. van Dishoeck²⁰, Tom
Ray²⁷, Göran Östlin²⁸, Gillian Wright²⁹

†These authors contributed equally to this work.

*Corresponding author(s). Email(s): barrado@cab.inta-csic.es.

<footnote n="1">¹Centro de Astrobiología (CAB), CSIC-INTA, ESAC Campus, Camino Bajo del Castillo s/n, 28692 Villanueva de la Cañada, Madrid, Spain</footnote>

<footnote n="2">²Max-Planck-Institut für Astronomie (MPIA), Königstuhl 17, 69117 Heidelberg, Germany</footnote>

<footnote n="3">³Institute of Particle Physics and Astrophysics, ETH Zürich, Wolfgang-Pauli-Strasse 27, 8093, Zürich, Switzerland</footnote>

<footnote n="4">⁴SRON Netherlands Institute for Space Research, Niels Bohrweg 4, 2333 CA Leiden, The Netherlands</footnote>

<footnote n="5">⁵Université Paris-Saclay, UVSQ, CNRS, CEA, Maison de la Simulation, 91191, Gif-sur-Yvette, France</footnote>

<footnote n="6">⁶Kapteyn Institute of Astronomy, University of Groningen, Groningen, The Netherlands</footnote>

<footnote n="7">⁷Netherlands Institute for Space Research (SRON), Leiden, The Netherlands</footnote>

<footnote n="8">⁸School of GeoSciences and Centre for Exoplanet Science, University of Edinburgh, Edinburgh, United Kingdom</footnote>

<footnote n="9">⁹Department of Astrophysics, American Museum of Natural History, New York, NY 10024, USA</footnote>

<footnote n="10">¹⁰STAR Institute, Université de Liège, Allée du Six Août 19c, 4000 Liège, Belgium</footnote>

<footnote n="11">¹¹Institute of Astronomy, KU Leuven, Celestijnenlaan 200D, 3001 Leuven, Belgium</footnote>

<footnote n="12">¹²Université Paris-Saclay, Université Paris cité, CEA, CNRS, AIM, 91191, Gif-sur-Yvette cedex, France</footnote>

<footnote n="13">¹³Department of Astrophysics/IMAPP, Radboud University, PO Box 9010, 6500 GL Nijmegen, The Netherlands</footnote>

<footnote n="14">¹⁴SRON Netherlands Institute for Space Research, Niels Bohrweg 4, NL-2333 CA Leiden, the Netherlands</footnote>

<footnote n="15">¹⁵Department of Astrophysics, University of Vienna, Türkenschanzstr. 17, 1180 Vienna, Austria</footnote>

<footnote n="16">¹⁶ETH Zürich, Institute for Particle Physics and Astrophysics, Wolfgang-Pauli-Str. 27, 8093 Zürich, Switzerland</footnote>
Brown dwarfs serve as ideal laboratories for studying the atmospheres of giant exoplanets on wide orbits as the governing physical and chemical processes in them are nearly identical<sup>1,2</sup>. Understanding the formation of gas giant planets is challenging, often involving the endeavour to link atmospheric abundance ratios, such as the carbon-to-oxygen (C/O) ratio, to formation scenarios<sup>3</sup>. However, the complexity of planet formation requires additional tracers, as the unambiguous interpretation of the measured C/O ratio is fraught with complexity<sup>4</sup>. Isotope ratios, such as deuterium-to-hydrogen and <sup>14</sup>N/<sup>15</sup>N, offer a promising avenue to gain further insight into this formation process, mirroring their utility within the solar system<sup>5,6,7</sup>. For exoplanets only a handful of constraints on <sup>12</sup>C/<sup>13</sup>C exist, pointing to the accretion of <sup>13</sup>C-rich ice from beyond the disks' CO iceline<sup>8,9</sup>. Here we report on the mid-infrared detection of the <sup>14</sup>NH<sub>3</sub> and <sup>15</sup>NH<sub>3</sub> isotopologues in the atmosphere of a cool brown dwarf with an effective temperature of 380 K in a spectrum taken with the Mid-InfraRed Instrument of the James Webb Space Telescope. As expected, our results reveal a <sup>14</sup>N/<sup>15</sup>N value consistent with star-like formation by gravitational collapse, demonstrating that this ratio can be accurately constrained. Since young stars and their planets should be more strongly enriched in the <sup>15</sup>N isotope<sup>10</sup>, we expect that <sup>15</sup>NH<sub>3</sub> will be detectable in a number of cold, wide-separation exoplanets.

<footnote n="17"><sup>17</sup>LESIA, Observatoire de Paris, Université PSL, CNRS, Sorbonne Université, Université de Paris
Cité, 5 place Jules Janssen, 92195 Meudon, France</footnote>

<footnote n="18"><sup>18</sup>Université Paris-Saclay, CEA, Département d'Electronique des Détecteurs et d'Informatique pour la Physique, 91191, Gif-sur-Yvette, France</footnote>

<footnote n="19"><sup>19</sup>LERMA, Observatoire de Paris, Université PSL, CNRS, Sorbonne Université, Paris, France</footnote>

<footnote n="20"><sup>20</sup>Leiden Observatory, Leiden University, P.O. Box 9513, 2300 RA Leiden, The Netherlands</footnote>

<footnote n="21"><sup>21</sup>Université Paris-Saclay, Université Paris Cité, CEA, CNRS, AIM, F-91191 Gif-sur-Yvette, France</footnote>

<footnote n="22"><sup>22</sup>UK Astronomy Technology Centre, Royal Observatory, Blackford Hill, Edinburgh EH9 3HJ, United Kingdom</footnote>

<footnote n="23"><sup>23</sup>European Space Agency, Space Telescope Science Institute, Baltimore, MD, USA</footnote>

<footnote n="24"><sup>24</sup>Department of Astronomy, Stockholm University, AlbaNova University Center, 10691 Stockholm, Sweden</footnote>

<footnote n="25"><sup>25</sup>School of Physics & Astronomy, Space Research Centre, Space Park Leicester, University of Leicester, 92 Corporation Road, Leicester, LE4 5SP, United Kingdom</footnote>

<footnote n="26"><sup>26</sup>Department of Physics and Astronomy, University College London, Gower Street, WC1E 6BT, United Kingdom</footnote>

<footnote n="27"><sup>27</sup>School of Cosmic Physics, Dublin Institute for Advanced Studies, 31 Fitzwilliam Place, Dublin, D02 XF86, Ireland</footnote>

<footnote n="28"><sup>28</sup>Department of Astronomy, Oskar Klein Centre, Stockholm University, 106 91 Stockholm, Sweden</footnote>

<footnote n="29"><sup>29</sup>UK Astronomy Technology Centre, Royal Observatory Edinburgh, Blackford Hill, Edinburgh EH9 3HJ, United Kingdom</footnote>
The coldest class of brown dwarfs, so-called Y-dwarfs, span temperatures from 250 K to 500 K¹¹. Their atmospheres are dominated by the absorption of water, methane, and ammonia, while water clouds likely become important for the colder Y-dwarfs¹². Since their emission peaks in the mid-infrared beyond 4 µm, Y-dwarf spectroscopic characterisation is challenging and the number of studies has been limited¹³,¹²,¹⁴. JWST is transforming the study of Y-dwarfs, by granting access to their full luminous range¹⁵. We analysed JWST/MIRI Medium Resolution Spectrometer (MRS)¹⁶ observations of the Y-dwarf archetype WISEP J182831.08+265037.8 (hereafter WISE J1828), with an effective temperature of ~380 K¹¹. We obtain a mid-infrared spectrum at R~3,000 to 1,500, between 4.9 and 27.9 µm. The data reduction is described in Methods. Our observations are presented in Fig. 1, together with an exemplary best-fit model from our analysis, and reveal a spectrum rich in molecular features, namely a broad water absorption band at 5-7 µm, methane at 7.6 µm, and ammonia at 9-13 µm. The ammonia band is also shown in more detail in the lower panels of Fig. 1. We analyzed the atmospheric properties of WISE J1828 using several retrieval codes¹⁷,¹⁸,¹⁹ and self-consistent atmosphere models in radiative-convective equilibrium²⁰,²¹,²². The best-fit spectra and residuals are shown in Extended Data, Fig. 1. Since the MIRI observations mostly probe high altitudes in the atmosphere (with the contribution function peaking at ~1 bar), we also added archival near-infrared data¹⁴, which probes deeper layers, at pressures of ~10 bar (Extended Data Fig. 2). Due to its high luminosity, given its spectral type, WISE J1828 is suggested to be a binary systemª. We thus modeled WISE J1828 as an equal mass binary system, emitting with identical atmospheres.

By combining the results of different retrieval approaches (see Methods), we constrain the log₁₀(Volume Mixing Ratios) (VMRs) of the conspicuous absorbers H₂O, CH₄, and ¹⁴NH₃ to be -3.03>+0.18/-0.21, -3.65>+0.21/-0.21, and -4.79>+0.15/-0.25 respectively. The surface gravity of WISE J1828 is constrained to be log(g)=4.34>+0.42/-0.88, the effective temperature is 378>+13/-18 K, and the radius is constrained to 1.37>+0.26/-0.13 R<sub>Jup</sub>. The uncertainties for these values are dominated by the dispersion between the various fitting approaches, and are thus larger than the actual uncertainties derived from any single analysis. A posterior plot of the various retrievals is shown in the Extended Data Fig. 3, while all retrieval results are summarized in the Extended Data Table 1. The self-consistent models constrain the atmospheric properties to be log(g) = 4.5±1.0, R = 1.27±0.21 R<sub>Jup</sub>, and T<sub>eff</sub> = 450±101 K. Again, the reported uncertainties are dominated by differences between the two models. Our best-fit values of log(g), R, and T<sub>eff</sub>, after applying a binary correction to the inferred radii (dividing by √2), indicate an age of ~5 Gyr for a ~15 M<sub>Jup</sub> equal-mass binary system²⁴, which is consistent with our mass constraints, see Extended Data Table 2.

The metallicity we derive for WISE J1828, combining the results of all approaches that included it as a free parameter (retrievals and self-consistent), is consistent with solar: [M/H] = 0.02>+0.12/-0.31. For C/O we find 0.22>+0.37/-0.03 (solar is 0.55±0.10²⁵), while N/O is constrained to 0.014>+0.021/-0.002 (solar is 0.138±0.023²⁵). These uncertainties are again dominated by the dispersion between different approaches. The resulting posteriors for the metallicity, C/O and N/O are shown in Extended Data Fig. 3. Our findings thus indicate an atmosphere with a solar bulk metallicity, but depleted

<footnote>ªHowever, numerous studies, including recent JWST measurements, all failed at resolving its binarity, putting an upper limit of 0.5 au on the separation of its components¹¹,²³.</footnote>
in C and N. A likely cause for this is a departure from chemical equilibrium, where gas poor in both NH₃ and CH₄ is mixed up from the deep interior of the object²⁶. The resulting gas would be enriched in N₂ and CO, which our observations are not sensitive to; while N₂ is not spectrally active at all, our shortest wavelengths are longer than the location of the fundamental band of CO at ~4.5 µm. However, it is questionable whether enough CO can be mixed up from the deep atmosphere to palpably change the inferred C/O ratio²⁷.

In addition, we detect ¹⁵NH₃ with a significance ranging from 4-6 σ, with several lines of ammonia clearly visible in the data, see Fig. 1. We derive a VMR of -7.68<sup>+0.24</sup><sub>-0.34</sub> for ¹⁵NH₃ and ¹⁴N/¹⁵N=670<sup>+390</sup><sub>-211>, averaging over the results of various models. In Fig. 2, we summarize ¹⁴N/¹⁵N for a range of astrophysical objects⁷. Our value for WISE J1828 is consistent with solar at the 1-2 σ level. Both the Sun and WISE J1828, which we derive to have similar ages, have ¹⁴N/¹⁵N values above those observed in the interstellar medium, which has been enriched in ¹⁵N by galactic stellar evolution since their formation¹⁰. Our measurement thus shows that WISE J1828 most likely formed like a star, as expected²⁸. A strong ice enrichment is unlikely, and we correspondingly rule out cometary values ¹⁴N/¹⁵N<200 by more than 3 σ.

Constraints on ¹⁴N/¹⁵N can serve as a formation tracer. For example, comets in the solar system, fundamental planetary building blocks, are enriched in ¹⁵N by a factor of 2-3 when compared to solar, due to ¹⁵N-rich NH₃ and HCN ice. In contrast, N₂ gas in the solar accretion disk is thought to have been depleted in ¹⁵N⁷. In the solar system both Jupiter and Saturn are enriched in bulk nitrogen, but show ¹⁴N/¹⁵N values consistent with the Sun. This may mean that they accreted ice cold enough to contain even the volatile N₂ ice, which requires temperatures <30 K, and corresponds to orbital distances >25 au²⁹,³⁰. An enriched nitrogen content through accretion of ice, but at solar ¹⁴N/¹⁵N, may therefore require accretion close to where even the highly volatile N₂ can condense.

The understanding of how nitrogen fractionation actually occurs is incomplete⁷, but we summarize some processes during different stages of the stellar and planetary evolution in Fig. 3. In the denser parts of the clouds an increase of ¹⁵N in NH₃ is inferred, with a candidate for this fractionation being isotope-selective photo-dissociation³¹. Subsequently, NH₃ and HCN ices condense in the colder clumps, potentially producing ¹⁵N-rich ice. Once a protostar is formed, there is some evidence that ¹⁴N/¹⁵N decreases further³²,³³. The final consequence is thought to be a ¹⁵N increase in the less volatile nitrogen-carriers, leading to the observed increase in ¹⁵N in HCN for protoplanetary disks and in NH₃ and HCN for solar system comets. We note that models predict ¹⁵N-poor NH₃ gas in protoplanetary disks³³.

To further assess ¹⁴N/¹⁵N as a formation tracer, we used a simplified planet formation model⁴. We tracked ¹⁴N/¹⁵N as a function of the mass accreted as icy and rocky material, for a planet located between the N₂ iceline of the disk, at about 20-80 au, and the NH₃ iceline, ten times closer in³⁰,³⁴. The ices were therefore likely enriched in ¹⁵N. We find that for Saturn-like metal enrichment (~6× solar³⁵) the ¹⁴N/¹⁵N decreases by 30-40% when compared to solar (see Extended Data Fig. 4), indicating that ¹⁴N/¹⁵N can significantly vary when compared to the stellar value for
a planet forming between the N₂ and NH₃ icelines.

With JWST MIRI, the formation-sensitive isotopologues ¹⁴NH₃ and ¹⁵NH₃ become accessible for objects with low effective temperatures. In the mid-infrared, NH₃ is a dominating absorber from T<sub>eff</sub> = 1000 K<sup>36</sup>, down to at least 380 K, the effective temperature of WISE J1828. As demonstrated above, ¹⁴N/¹⁵N can constrain formation locations with respect to the NH₃ and N₂ icelines of the disk. This is in addition to constraints on N/O, that the detection of H₂O and NH₃ enables, which has been suggested as another useful formation tracer<sup>37,38</sup>, but which needs careful interpretation due to chemical disequilibrium processes<sup>26</sup>. Simultaneous constraints on C/O, N/O and ¹⁴N/¹⁵N, based on CH₄, CO, H₂O and NH₃, can be obtained for cold directly imaged exoplanets, further elucidating their formation history. These planets are found in orbits ranging from ten to hundreds of au, challenging the core-accretion paradigm for planetary formation<sup>39</sup>. They either formed at their detected locations via a star-like gravitational instability, or originated closer to their star via core accretion and subsequent outward migration<sup>40</sup>.

## References

1. Burrows, A. et al. A nongray theory of extrasolar giant planets and brown dwarfs. *Astrophys. J.* **491**, 856–875 (1997).

2. Faherty, J. K. Spectral properties of brown dwarfs and unbound planetary mass objects. In Deeg, H. & Belmonte, J. (eds.) *Handbook of Exoplanets* (Springer, Cham, 2018).

3. Madhusudhan, N., Amin, M. A. & Kennedy, G. M. Toward Chemical Constraints on Hot Jupiter Migration. *Astrophys. J. Letters* **794**, L12 (2014).

4. Mollière, P. et al. Interpreting the Atmospheric Composition of Exoplanets: Sensitivity to Planet Formation Assumptions. *Astrophys. J.* **934**, 74 (2022).

5. Feuchtgruber, H. et al. The D/H ratio in the atmospheres of Uranus and Neptune from Herschel-PACS observations. *Astron. Astrophys.* **551**, A126 (2013).

6. Alibert, Y. et al. The formation of Jupiter by hybrid pebble-planetesimal accretion. *Nature Astronomy* **2**, 873–877 (2018).

7. Nomura, H., Furuya, K., Cordiner, M. A. et al. The isotopic links from planet formation regions to the solar system. In *Protostars and Planets VII* (2022). Retrieved from astro-ph/10863v1.

8. Zhang, Y., Snellen, I. A. G., Bohn, A. J. et al. The 13co-rich atmosphere of a young accreting super-jupiter. *Nature* **595**, 370–372 (2021).

9. Line, M. R. et al. A solar C/O and sub-solar metallicity in a hot Jupiter atmosphere. *Nature* **598**, 580–584 (2021).
10. Adande, G. R. & Ziurys, L. M. Millimeter-wave observations of cn and hnc and their 15n isotopologues: a new evaluation of the 14n/15n ratio across the galaxy. Astrophys. J. 744, 194 (2012).

11. Cushing, M. C. et al. The discovery of y dwarfs using data from the wide-field infrared survey explorer (wise). Astrophys. J. 743, 50 (2011).

12. Morley, C. V. et al. An L Band Spectrum of the Coldest Brown Dwarf. Astrophys. J. 858, 97 (2018).

13. Skemer, A. J. et al. The First Spectrum of the Coldest Brown Dwarf. Astrophys. J. Letters 826, L17 (2016).

14. Cushing, M. C. et al. An Improved Near-infrared Spectrum of the Archetype Y Dwarf WISEP J182831.08+265037.8. Astrophys. J. 920, 20 (2021).

15. Beiler, S. et al. The First JWST Spectral Energy Distribution of a Y dwarf. arXiv e-prints arXiv:2306.11807 (2023).

16. Argyriou, I. et al. JWST MIRI flight performance: The Medium-Resolution Spectrometer. arXiv e-prints arXiv:2303.13469 (2023).

17. Burningham, B. et al. Retrieval of atmospheric properties of cloudy L dwarfs. Mon. Not. R. Astron. Soc. 470, 1177-1197 (2017).

18. Mollière, P. et al. petitRADTRANS. A Python radiative transfer package for exoplanet characterization and retrieval. Astron. Astrophys. 627, A67 (2019).

19. 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).

20. Tremblin, P. et al. Fingering Convection and Cloudless Models for Cool Brown Dwarf Atmospheres. Astrophys. J. Letters 804, L17 (2015).

21. Chubb, K. L. & Min, M. Exoplanet Atmosphere Retrievals in 3D Using Phase Curve Data with ARCIS: Application to WASP-43b. Astron. Astrophys. 665, A2 (2022).

22. Ardévol Martínez, F., Min, M., Huppenkothen, D., Palmer, P. I. & Kamp, I. Floppity: A new machine learning framework for exoplanet atmospheric retrievals. In preparation.

23. De Furio, M. et al. JWST Observations of the Enigmatic Y-Dwarf WISE 1828+2650. I. Limits to a Binary Companion. Astrophys. J. 948, 92 (2023).

24. Phillips, M. W. et al. A new set of atmosphere and evolution models for cool T-Y brown dwarfs and giant exoplanets. Astron. Astrophys. 637, A38 (2020).
25. Asplund, M., Grevesse, N., Sauval, A. J. & Scott, P. The Chemical Composition of the Sun. *Annual Review of Astron. Astrophys.* **47**, 481–522 (2009).

26. Zahnle, K. J. & Marley, M. S. Methane, Carbon Monoxide, and Ammonia in Brown Dwarfs and Self-Luminous Giant Planets. *Astrophys. J.* **797**, 41 (2014).

27. Miles, B. E. et al. Observations of Disequilibrium CO Chemistry in the Coldest Brown Dwarfs. *Astron. J.* **160**, 63 (2020).

28. Chabrier, G., Johansen, A., Janson, M. & Rafikov, R. Giant planet and brown dwarf formation. In Beuther, H., Klessen, R. S., Dullemond, C. P. & Henning, T. (eds.) *Protostars and Planets VI*, 619–642 (University of Arizona Press, 2014).

29. Fletcher, L. N. et al. The origin of nitrogen on jupiter and saturn from the 15n/14n ratio. *Icarus* **238**, 170–190 (2014).

30. Öberg, K. I. & Wordsworth, R. Jupiter's Composition Suggests its Core Assembled Exterior to the N₂ Snowline. *Astron. J.* **158**, 194 (2019).

31. Furuya, K. & Aikawa, Y. Depletion of heavy nitrogen in the cold gas of star-forming regions. *Astrophys. J.* **857**, 105 (2018).

32. Bergner, J. B., Öberg, K. I., Bergin, E. A. et al. An evolutionary study of volatile chemistry in protoplanetary disks. *Astrophys. J.* **898**, 97 (2020).

33. Visser, R. et al. Nitrogen isotope fractionation in protoplanetary disks. *Astron. Astrophys.* **615**, A75 (2018).

34. Bosman, A. D., Cridland, A. J. & Miguel, Y. Jupiter formed as a pebble pile around the n2 ice line. *Astron. Astrophys. Letters* **632**, L11 (2019).

35. Guillot, T. & Gautier, D. Giant Planets. In Schubert, G. (ed.) *Treatise on Geophysics*, 529–557 (2015).

36. Suarez, G. & Metchev, S. Ultracool dwarfs observed with the spitzer infrared spectrograph. ii. emergence and sedimentation of silicate clouds in 1 dwarfs, and analysis of the full m5–t9 field dwarf spectroscopic sample. *Mon. Not. R. Astron. Soc.* **513** (2022).

37. Öberg, K. I. & Bergin, E. A. Astrochemistry and compositions of planetary systems. *Physics Reports* **893**, 1–48 (2021).

38. Turrini, D. et al. Tracing the Formation History of Giant Planets in Protoplanetary Disks with Carbon, Oxygen, Nitrogen, and Sulfur. *Astrophys. J.* **909**, 40 (2021).

39. Adams, F. C., Meyer, M. R. & Adams, A. D. A Theoretical Framework for the Mass Distribution of Gas Giant Planets Forming through the Core Accretion Paradigm. *Astrophys. J.* **909**, 1 (2021).
40. Marleau, G.-D., Coleman, G. A. L., Leleu, A. & Mordasini, C. Exploring the formation by core accretion and the luminosity evolution of directly imaged planets. The case of HIP 65426 b. *Astron. Astrophys.* **624**, A20 (2019).
# Methods

## JWST/MIRI observations and data processing

The MIRI/MRS targeted WISE J1828 on July 28th 2022 without the use of target acquisition as part of JWST Guaranteed Time Observing program with PID 1189. All three dichroic/grating settings (SHORT, MEDIUM, LONG) were obtained in order to cover the full wavelength range, from 4.9 - 27.9 µm¹⁶. The observations were executed with the point source optimized two-point dither (negative direction), and the detector set up with 180 frames per integration. No dedicated background observations were obtained.

The jwst pipeline was used (pipeline version: 1.9, CRDS version: 11.16.20, CRDS context: jwst_1045.pmap) to process the data. The raw (level 1B) files were processed with the detector level pipeline (CALWEBB_DETECTOR1) to produce calibrated rate files. This pipeline applies corrections for the nonlinearity of the ramps, dark current, detects jumps in the ramp due to cosmic rays, and finally fits the ramp signal to obtain slope values (rate.fits). The detector images were inspected and no sign of cosmic ray showers were found¹⁶. Since the WISE J1828 detector images were clean, we could use the fact that the point source itself is faint to perform a nod subtraction between the two dither points. First, we had to make sure that for every pair of detector images the flux levels were on the same level before subtracting them. A small time dependent difference between the individual integrations has been seen in MRS observations, with the first integration of the visit having a brighter flux level originating from the detector idling prior to the start of the exposures¹⁶. We used the region between the MRS channels on the detectors that do not contain any astrophysical signal to estimate a single value using the median, and subtract it from the whole detector. Next, the two dithers were subtracted from each other to remove the thermal background contribution. For Channel 1 of the MRS, a detector artifact that manifests as vertical stripes was still present after the nod subtraction. These stripes were around 10% of the science signal, and since the dispersion direction also closely follows the detector columns¹⁶ the stripes affect the continuum of the extracted spectrum. We chose a region of the detector where the source signal was almost zero, and estimated the stripe contribution as the median of ten rows, which was then subtracted from every row of the detector.

With the detector images clean from detector artifacts and the thermal background, the spectroscopy pipeline (CALWEBB_SPEC2) was run in order to obtain calibrated detector images (cal.fits), assigning the astrometric and wavelength information, correcting for the scattered light and detector fringing, and applying the photometric calibration. Finally, with CALWEBB_SPEC3 we built the dither combined cubes⁴¹, with outlier rejection enabled. With background subtracted cubes, the spectral extraction from the cube is done by performing aperture photometry for each wavelength slice of the cube. We first determined the center of the point source by fitting a 2D Gaussian in the wavelength collapsed cube, then placed an
aperture of 1 Full Width Half Max (FWHM) centered on the source, applying an aperture
correction for each wavelength to account for the missing flux of the point spread function
outside the aperture. Some outliers remain in the extracted spectrum, which were removed for
plotting the spectrum in Fig. 1 but not while fitting it. We traced back these outliers to the
detector where a few cosmic rays overlap with the spectral trace, but are not bright enough for
the outlier algorithm to detect. We therefore clip these values manually for each spectral band
by setting a threshold for the flux. The outliers affected in total 0.4% of the spectrum.

**Retrieval analysis**

We carried out independent analyses of the MIRI/MRS spectra using a diversity of models, namely with the radiative-convective equilibrium codes ATMO and ARCIS+ML, and with the retrieval codes ARCIS, Brewster, and petitRADTRANS<sup>20,19,17,18,21,22</sup>. For computational feasibility, the retrievals with ARCIS, Brewster, and petitRADTRANS were run at a resolution of $\lambda/\Delta\lambda = 1000$; the MRS data was binned down correspondingly. For the retrievals we decided on a setup that assumed vertically constant absorber abundances that were retrieved freely, and a flexible parameterization of the pressure-temperature structure, which varied slightly between the setups, see below. For the retrievals presented here we assumed WISE J1828 to be a single object, but allowed for a radius prior wide enough to account for an equal-brightness binary scenario. Clouds were neglected, which appears to be justified from a population-wide Y-dwarf retrieval analysis on Hubble Space Telescope (HST) data<sup>42</sup>. We note, however, that the impact of clouds should increase towards longer wavelengths, and for colder Y-dwarfs<sup>43,44</sup>. As shown in Extended Data Fig. 2, our inferred P-T profiles cross the water saturation vapor pressure curve at the top of the photosphere probed by HST and MIRI, so a cloud could have some moderate impact on our results and the effect of its inclusion should be assessed in future studies.

We also observed that the reported uncertainties of the JWST reduction can be much smaller
than the differences observed in the overlapping regions of MRS subchannels. In addition,
all best-fit models had a $\chi^2$ considerably larger than the number of wavelength channels. We
thus opted for retrieving the magnitude of the uncertainties via the 10$^b$ treatment$^{45}$, where the
error bars $\sigma$ considered during the retrieval are calculated from the uncertainties reported from
the reduction $\sigma_{red}$ as follows: $\sigma = \sqrt{\sigma_{red}^2 + 10^b}$. Separate bs were retrieved for MIRI and
HST data, respectively. The retrieved pressure-temperature structures of the retrievals would
also exhibit kinks sometimes, which are challenging to reconcile with radiative-convective
equilibrium models. In this case we implemented a regularization of the pressure-temperature
structure$^{45}$. With this modification, the ARCIS and petitRADTRANS retrievals optionally put
a penalty on $d^2\log T/d\log P^2$, which strives towards a constant power-law dependence between
pressure and temperature, since $d\log T/d\log P = \text{cst}$ implies $T \propto P^\alpha$, with $\alpha$ being the
constant power law coefficient. This setup may therefore also reproduce the relation between
pressure and temperature in the deep atmosphere, which is expected to be convective. The
individual models we used for the analysis are described below.
The results of all model inferences for WISE J1828 are found in Extended Data Table 1, and the combined result of all retrievals is presented in Extended Data Table 2. Elemental abundance ratios (C/O, N/O, $^{14}$N/$^{15}$N) were computed from the retrievals' VMR constraints for the atmospheric absorbers. They may thus miss additional atoms locked up in clouds (in the case of oxygen) or affected by quenching in species which are spectrally inactive ($N_2$ in the case of N) or have features outside the HST and MIRI wavelength range (CO in the case of C and O). The one-dimensional projection of the posteriors, for key forward model parameters, is shown in Extended Data Fig. 3 for all individual models. In Extended Data Fig. 2 we show the associated pressure-temperature uncertainties derived from all model analyses.

## ATMO

We briefly describe the main properties of the ATMO$^{20}$ models and the grids that have been used in our study. These grids are publicly available at https://opendata.erc-atmo.eu. The ATMO models assume that clouds are not needed to reproduce the shape of the SED of brown dwarfs (apart from the 10-µm silicate feature). The authors have proposed that diabatic convective processes$^{46}$ induced by out-of-equilibrium chemistry of CO/CH$_4$ and N$_2$/NH$_3$ can reduce the temperature gradient in the atmosphere and reproduce the reddening previously thought to occur by clouds. The grids assume a modification of the temperature gradient with an effective adiabatic index. The levels modified are between 2 and 200 bars at $log(g) = 5.0$ and are scaled by $10^{log(g)-5}$ at other surface gravities. Out-of-equilibrium chemistry is used with $K_{zz} = 10^5$ cm$^2$ s$^{-1}$ at $log(g) = 5.0$ and is scaled by $10^{2[5-log(g)]}$ at other surface gravities. The mixing length is assumed to be two scale heights at 20 bars and higher pressures at $log(g) = 5.0$, and is scaled down by the ratio between the local pressure and the pressure at 20 bars for lower pressures. The 20 bars limit is scaled by $10^{log(g)-5}$ at other surface gravities. The chemistry includes 277 species and out-of-equilibrium chemistry has been performed using a relaxation model$^{47}$. Rainout is assumed to occur for species that are not included in the out-of-equilibrium model. Opacity sources include H$_2$-H$_2$, H$_2$-He, H$_2$O, CO$_2$, CO, CH$_4$, NH$_3$, Na, K, Li, Rb, Cs, TiO, VO, FeH, PH$_3$, H$_2$S, HCN, C$_2$H$_2$, SO$_2$, Fe, H-, and the Rayleigh scattering opacities for H$_2$, He, CO, N$_2$, CH$_4$, NH$_3$, H$_2$O, CO$_2$, H$_2$S, SO$_2$. The grids explore the following parameters: effective temperatures between 250 and 1200K; $log(g)$ between 2.5 and 5.5 (step 0.5); effective adiabatic index (reddening) at a value of 1.25. A standard $\chi^2$-minimization procedure was used to find the best fitting model.

## petitRADTRANS

petitRADTRANS, or pRT$^{18}$ (available from https://petitradtrans.readthedocs.io), is a Python package for the spectral synthesis of exoplanets and allows users to calculate transmission, emission or reflectance spectra. It offers a wide selection of opacities (gas line and continuum, and cloud opacities). Spectra can be calculated at any resolution, up to a wavelength spacing of $\lambda/\Delta\lambda = 10^6$. Coupled to a Bayesian
inference method such as PyMultiNest<sup>48,49</sup>, which pRT provides as a pre-implemented
retrieval package, posterior distributions for atmospheric parameters can be derived, given
an observation. For WISE J1828 we assumed a forward model setup as described for
the retrievals above, with the priors and forward model details set up as described in the
following. The prior on log(g) was uniform from 2.5 to 6, while the radius prior ranged
from 0.5 to 3 Jupiter radii. In addition, the pressure-temperature profile was parameterized
by retrieving temperature values at 10 locations, equidistantly spaced in log-space between
10<sup>-6</sup> and 1000 bar, and then quadratically interpolating the temperature between these nodes
in log(pressure). The priors were set up such that the temperature at 1000 bar was uniformly
sampled between 100 and 9000 K, and the temperatures at lower-pressure nodes was allowed
to be between 0.2-1.0 the temperature of the neighboring deeper atmospheric node. Since
kinks in the P-T profiles could be observed in the standard setup, the P-T regularization
described above was optionally turned on when deriving the atmospheric model posteriors,
fitting both MIRI/MRS and the archival HST WFC3 data. Our constraints on <sup>14</sup>N/<sup>15</sup>N are
not affected by the regularization. However, we observed a trend that a regularized P-T leads
to a higher atmospheric metal enrichment, higher gravity log(g), smaller radii, and higher
effective temperatures, see Extended Data Fig. 2. For the detection of <sup>15</sup>NH<sub>3</sub> we only used
the MRS data. We also turned the regularization off, to allow for maximum model flexibility.
This leads to a conservative estimate of the detection significance. The following opacity
species were included in the retrievals: H<sub>2</sub>O<sup>50</sup>, CH<sub>4</sub><sup>51</sup>, CO<sup>52</sup>, CO<sub>2</sub><sup>53</sup>, <sup>15</sup>NH<sub>3</sub><sup>54</sup>, H<sub>2</sub>S<sup>55</sup>, NH<sub>3</sub><sup>56</sup>,
and PH<sub>3</sub><sup>57</sup>. The abundances of said molecules were retrieved using log-uniform priors from
10<sup>-10</sup> to 1 on their mass fractions. For the <sup>15</sup>NH<sub>3</sub> detection we used PyMultiNest, with 2000
live points, constant_sampling_efficiency set to False, and a sampling efficiency
of 0.3. The detection significance of <sup>15</sup>NH<sub>3</sub> was determined using a standard method<sup>58</sup>. We
report a detection significance of 4.2 σ for <sup>15</sup>NH<sub>3</sub>. For the retrievals constraining the properties
of WISE J1828, which included HST in addition to MRS data, we ran in constant sampling
efficiency mode, with the efficiency set to 5 %. This needed to be done because otherwise
retrievals ran for 10<sup>8</sup> models, but did not finish. The partially filled weighted posterior files
of the 10<sup>8</sup>-model retrievals were consistent with the results using the constant sampling
efficiency mode. With petitRADTRANS we found <sup>14</sup>N/<sup>15</sup>N = 560<sup>+165</sup><sub>-115</sub> for the flexible P-T
and <sup>14</sup>N/<sup>15</sup>N = 642<sup>+365</sup><sub>-192</sub> for the regularized P-T model.

ARCIS

The ARtfull Modeling Code for exoplanet Science (ARCiS) is a forward modelling and re-
trieval code that can be used to analyse and simulate exoplanet atmosphere spectra. It con-
tains many physical and chemical processes including cloud formation⁵⁹ and disequilibrium
chemistry⁶⁰. The free P-T structure used in this work is parameterized by the slope at several
pressure points in the atmosphere. We parameterize $d\log T/d\log P$ with a prior range between
-4/7 to +4/7. The adiabatic gradient expected for a diatomic gas is $d\log T/d\log P = 2/7$ so
this prior range gives a very generous range. We fix the absolute value of the temperature
structure at a pressure of $P = 0.1$ bar. We retrieve the value of the slope at 12 pressure
points equally distributed over the atmosphere in log $-P$ space. For the detection of $^{15}$NH$_3$ we follow this procedure, allowing full flexibility and thereby constructing a conservative detection significance. For the final fits deriving the isotopic ratio and the planet parameters presented, we restrict the gradient of the P-T structure to be positive as expected for a non-irradiated atmosphere. Following a standard approach$^{58}$, we find evidence that $^{15}$NH$_3$ is present in the atmosphere of WISE J1828 at $6.3 \ \sigma$. We observe the same trend between metal enrichment, $\log(g)$, radii, and effective temperature as petitRADTRANS when regularizing the P-T structure, see Fig. 2. However, our derived $^{14}$N/$^{15}$N values are somewhat less stable when turning on regularization. Our regularized values are consistent with the petitRADTRANS (regularized and flexible P-T), namely $^{14}$N/$^{15}$N = $591_{-190}^{+432}$. The value derived for the flexible P-T setup is higher ($^{14}$N/$^{15}$N = $949_{-208}^{+322}$). More information on ARCIS can be found at http://www.exoclouds.com.

## ARCIS+ML

For the self-consistent retrieval with ARCIS we assume a one-dimensional atmosphere in radiative-convective equilibrium. The retrievals were run on the MIRI MRS data only (i.e., not including the HST data). The atmospheric composition is parameterized using [M/H], C/O and N/O, and we account for disequilibrium chemistry of CH$_4$-H$_2$O-CO and NH$_3$-N$_2$ due to vertical mixing$^{60}$, where the vertical eddy diffusion coefficient $K_{zz}$ is another free parameter. For WISE J1828 observed that, although NH$_3$-N$_2$ quenching was active in our models, it quenched from the lowest layer in the atmosphere where NH$_3$ was still the dominating absorber. Likely quenching actually occurs outside our simulated pressure domain, deeper inside the atmosphere. Therefore the ARCIS+ML constraints may be too low for N/O, similar to the constraints from the retrievals, which are insensitive to the spectrally inactive N$_2$. The radiative transfer module was benchmarked$^{21}$. Due to the high computational load of the self-consistent models we cannot run nested sampling retrievals, which require millions of model evaluations to converge. Instead, we use a machine learning method based on SNPE (sequential neural posterior estimation$^{61}$) that allows us to perform the retrieval using on the order of $10^4$ models. The details of this retrieval method will be presented in an upcoming publication$^{22}$.

## Brewster

Brewster$^{62,63}$, is a retrieval code that has mainly been employed in the context of exploring clouds in brown dwarfs. However, here, we utilised a simple cloud-free retrieval recipe. Brewster uses the two stream radiative transfer architecture$^{64}$. We use the default 64 layer atmosphere with intervals of 0.1 dex across the pressures range log P/bar) of -4 to 2.3. The temperature is set using P-T parameterisation$^{65}$ linked to three atmospheric zones via exponential gradients. We included the molecules H$_2$O, CH$_4$, NH$_3$, CO, PH$_3$ and H$_2$S which originate from a compendium$^{66,67}$ and updated opacities$^{62}$. The abundances of these molecules are modeled assuming vertically constant mixing ratios, which are retrieved as free parameters.
The opacities are ingested at a resolution of R=10,000, putting the native model resolution an order of magnitude above the data being fit. Continuum opacity's for H₂-H₂ and H₂-He collisionally induced absorption, Rayleigh scattering due to H₂, He and CH₄, and continuum opacities due to bound-free and free-free absorption by H- and free-free absorption by H₂ are also included. We apply an error inflation "tolerance" framework⁴⁵ and used in all subsequent published works using *Brewster*. Only the JWST/MIRI MRS observations were retrieved with *Brewster*, so the HST data was not included. Here we used the EMCEE⁶⁸ as our sampling algorithm. As we used the standard retrieval recipe for this code, an extensive list of parameter sampling priors has been used⁶³.

## Combining model results

Whenever we report values for the properties of WISE J1828 in the main body of the text, these have been obtained from combining the posteriors of the retrievals at equal weight, and calculating the corresponding median and 16-84 %–percentile values, corresponding to the 1 σ credible interval in case the resulting distribution is approximately Gaussian. The combined value of the self-consistent codes was obtained by taking the average of their best-fit (ATMO) and median (ARCIS+ML) values, while the uncertainty is obtained from calculating the difference *d* between these two values, and then calculating $\sqrt{d^2 + a^2}$, where *a* is the “1 σ” uncertainty obtained from the ARCIS+ML posterior.

## Exploring ¹⁴N/¹⁵N as a formation tracer

To approximate the impact of volatile ice accretion between the NH₃ and N₂ icelines in a protoplanetary disk, we generated a simplified planet formation model for calculating ¹⁴N/¹⁵N as a function of the total solid mass (rock and ices) a planet incorporated during formation. For this we used a specific framework⁴, which is available at https://gitlab.com/mauricemolli/formation-inversion. In short, we used a solar disk composition⁴, their Table 2. This means that the mass ratio between NH₃ and N₂ is 1:7 in the disk (combining gas and ice reservoirs). We then assumed, conservatively, that ¹⁴N/¹⁵N is reduced by a factor of 2 in NH₃, when compared to the total ¹⁴N/¹⁵N value, while the total ¹⁴N/¹⁵N (summing over all species and phases) is conserved, which we assumed to be 300, and call ISM value in the in Extended Data Fig. 4. This figure shows the ratio of the planetary and ISM values of ¹⁴N/¹⁵N as a function of solids accreted by a planet between the NH₃ and N₂ icelines. Since the solids are rich in NH₃, and N₂ is only in the gas phase, a higher accreted solid mass results in a lower planetary ¹⁴N/¹⁵N. We note that the picture could be more complicated, since the disk gas could be enriched in ¹⁵N-poor N₂ gas that evaporated off pebbles that drift in from outside the N₂ iceline⁶⁹.

## References
*Methods*
41. Law, D. R. et al. A 3D Drizzle Algorithm for JWST and Practical Application to the MIRI Medium Resolution Spectrometer. *arXiv e-prints* arXiv:2306.05520 (2023).

42. Zalesky, J. A., Line, M. R., Schneider, A. C. & Patience, J. A Uniform Retrieval Analysis of Ultra-cool Dwarfs. III. Properties of Y Dwarfs. *Astrophys. J.* **877**, 24 (2019).

43. Morley, C. V. et al. An L Band Spectrum of the Coldest Brown Dwarf. *Astrophys. J.* **858**, 97 (2018).

44. Mang, J. et al. Microphysics of Water Clouds in the Atmospheres of Y Dwarfs and Temperate Giant Planets. *Astrophys. J.* **927**, 184 (2022).

45. Line, M. R., Teske, J., Burningham, B., Fortney, J. J. & Marley, M. S. Uniform Atmospheric Retrieval Analysis of Ultracool Dwarfs. I. Characterizing Benchmarks, Gl 570D and HD 3651B. *Astrophys. J.* **807**, 183 (2015).

46. Tremblin, P. et al. Thermo-compositional Diabatic Convection in the Atmospheres of Brown Dwarfs and in Earth's Atmosphere and Oceans. *Astrophys. J.* **876**, 144 (2019).

47. Tsai, S.-M. et al. VULCAN: An Open-source, Validated Chemical Kinetics Python Code for Exoplanetary Atmospheres. *Astrophys. J. Sup. Series* **228**, 20 (2017).

48. Feroz, F. & Feroz, M. P. Multimodal nested sampling: an efficient and robust alternative to Markov Chain Monte Carlo methods for astronomical data analyses. *Mon. Not. R. Astron. Soc.* **384**, 449–463 (2008).

49. Buchner, J. et al. X-ray spectral modelling of the AGN obscuring region in the CDFS: Bayesian model selection and catalogue. *Astron. Astrophys.* **564**, A125 (2014).

50. 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).

51. Hargreaves, R. J. et al. An Accurate, Extensive, and Practical Line List of Methane for the HITEMP Database. *Astrophys. J. Sup. Series* **247**, 55 (2020).

52. Rothman, L. S. et al. HITEMP, the high-temperature molecular spectroscopic database. *J. Quant. Spectrosc. Radiat. Transfer* **111**, 2139–2150 (2010).

53. Yurchenko, S. N., Mellor, T. M., Freedman, R. S. & Tennyson, J. ExoMol line lists – XXXIX. Ro-vibrational molecular line list for CO2. *Mon. Not. R. Astron. Soc.* **496**, 5282–5291 (2020).

54. Rothman, L. S. et al. The HITRAN2012 molecular spectroscopic database. *J. Quant. Spectrosc. Radiat. Transfer* **130**, 4–50 (2013).

55. Azzam, A. A. A., Tennyson, J., Yurchenko, S. N. & Naumenko, O. V. ExoMol molecular line lists – XVI. The rotation–vibration spectrum of hot H2S. *Mon. Not. R. Astron. Soc.* **460**, 4063–4074 (2016).
56. Coles, P. A., Yurchenko, S. N. & Tennyson, J. ExoMol molecular line lists – XXXV. A rotation-vibration line list for hot ammonia. *Mon. Not. R. Astron. Soc.* **490**, 4638–4647 (2019).

57. Sousa-Silva, C., Al-Refaie, A. F., Tennyson, J. & Yurchenko, S. N. ExoMol line lists – VII. The rotation–vibration spectrum of phosphine up to 1500 K. *Mon. Not. R. Astron. Soc.* **446**, 2337–2347 (2014).

58. Benneke, B. & Seager, S. How to Distinguish between Cloudy Mini-Neptunes and Water/Volatile-dominated Super-Earths. *Astrophys. J.* **778**, 153 (2013).

59. Ormel, C. W. & Min, M. ARCIS framework for exoplanet atmospheres. The cloud transport model. *Astron. Astrophys.* **622**, A121 (2019).

60. Kawashima, Y. & Min, M. Implementation of disequilibrium chemistry to spectral retrieval code ARCIS and application to 16 exoplanet transmission spectra. Indication of disequilibrium chemistry for HD 209458b and WASP-39b. *Astron. Astrophys.* **656**, A90 (2021).

61. Greenberg, D., Nonnenmacher, M. & Macke, J. Automatic posterior transformation for likelihood-free inference. In Chaudhuri, K. & Salakhutdinov, R. (eds.) *Proceedings of the 36th International Conference on Machine Learning*, vol. 97 of *Proceedings of Machine Learning Research*, 2404–2414 (PMLR, 2019).

62. Burningham, B. et al. Retrieval of atmospheric properties of cloudy L dwarfs. *Mon. Not. R. Astron. Soc.* **470**, 1177–1197 (2017).

63. Burningham, B. et al. Cloud busting: enstatite and quartz clouds in the atmosphere of 2M2224-0158. *Mon. Not. R. Astron. Soc.* **506**, 1944–1961 (2021).

64. Toon, O. B., McKay, C. P., Ackerman, T. P. & Santhanam, K. Rapid calculation of radiative heating rates and photodissociation rates in inhomogeneous multiple scattering atmospheres. *J. Geophys. Res.* **94**, 16287–16301 (1989).

65. Madhusudhan, N. & Seager, S. A Temperature and Abundance Retrieval Method for Exo-planet Atmospheres. *Astrophys. J.* **707**, 24–39 (2009).

66. Freedman, R. S., Marley, M. S. & Lodders, K. Line and Mean Opacities for Ultracool Dwarfs and Extrasolar Planets. *Astrophys. J. Sup. Series* **174**, 504–513 (2008).

67. Freedman, R. S. et al. Gaseous Mean Opacities for Giant Planet and Ultracool Dwarf Atmospheres over a Range of Metallicities and Temperatures. *Astrophys. J. Sup. Series* **214**, 25 (2014).

68. Foreman-Mackey, D., Hogg, D. W., Lang, D. & Goodman, J. emcee: The MCMC Hammer. *PASP* **125**, 306 (2013).

69. Schneider, A. D. & Bitsch, B. How drifting and evaporating pebbles shape giant planets. II. Volatiles and refractories in atmospheres. *Astron. Astrophys.* **654**, A72 (2021).
**Data availability** The JWST MIRI data presented in this paper are part of the JWST MIRI GTO program (Program identifier (PID) 1189; P.I. T. Roellig). The JWST data will be publicly available in the Barbara A. Mikulski Archive for Space Telescopes (MAST; https://archive.stsci.edu/) after July 28th, 2023, and can be found either using the program identifier or using the Data Object Identifier (DOI): https://doi.org/10.17909/as3s-x893. The HST WFC3 spectrum is available from: https://cdsarc.cds.unistra.fr/viz-bin/cat/J/ApJ/920/20#/article.

**Code availability** The codes used in this publication to extract, reduce, and analyse the data are as follows; The data reduction pipeline jwst can be found at https://jwst-pipeline.readthedocs.io/en/latest/. The atmospheric model codes used to fit the data can be found at https://www.exoclouds.com/ for the ARCIS-code<sup>19</sup> and at https://petitradtrans.readthedocs.io/en/latest/ for the petitRADTRANS-code<sup>18</sup>. The simplified planet formation model<sup>4</sup> used to study <sup>14</sup>N/<sup>15</sup>N as a function of accreted ice mass can be found at https://gitlab.com/mauricemolli/formation-inversion. The detailed setups of the open source tools for the analyses presented here are described in the methods section of this paper, and can be made available to interested parties upon request.

**Inclusion & Ethics** All authors have committed to upholding the principles of research ethics & inclusion as advocated by the Nature Portfolio journals.

**Acknowledgments** This work is based [in part] 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 program 1189. MIRI draws on the scientific and technical expertise of the following organisations: Ames Research Center, USA; Airbus Defence and Space, UK; CEA-Irfu, Saclay, France; Centre Spatial de Liège, Belgium; Consejo Superior de Investigaciones Científicas, Spain; Carl Zeiss Optronics, Germany; Chalmers University of Technology, Sweden; Danish Space Research Institute, Denmark; Dublin Institute for Advanced Studies, Ireland; European Space Agency, Netherlands; ETCA, Belgium; ETH Zürich, Switzerland; Goddard Space Flight Center, USA; Institut d'Astrophysique Spatiale, France; Instituto Nacional de Técnica Aeroespacial, Spain; Institute for Astronomy, Edinburgh, UK; Jet Propulsion Laboratory, USA; Laboratoire d'Astrophysique de Marseille (LAM), France; Leiden University, Netherlands; Lockheed Advanced Technology Center (USA); NOVA Opt-IR group at Dwingeloo, Netherlands; Northrop Grumman, USA; Max-Planck Institut für Astronomie (MPIA), Heidelberg, Germany; Laboratoire d'Etudes Spatiales et d'Instrumentation en Astrophysique (LESIA), France; Paul Scherrer Institut, Switzerland; Raytheon Vision Systems, USA; RUAG Aerospace, Switzerland; Rutherford Appleton Laboratory (RAL Space), UK; Space Telescope Science Institute, USA; Toegepast Natuurwetenschappelijk Onderzoek (TNO-TPD), Netherlands; UK Astronomy Technology Centre, UK; University College London, UK; University of Amsterdam, Netherlands; University of Arizona, USA; University of Bern, Switzerland; University of Cardiff, UK; University of Cologne, Germany; University of Ghent; University of Groningen, Netherlands; University of Leicester, UK; KU Leuven, Belgium; University of Stockholm, Sweden; Utah, State University, USA. The following National and International Funding Agencies funded and supported the MIRI development: NASA; ESA; Belgian Science Policy Office (BELSPO); Centre Nationale d'Etudes Spatiales (CNES); Danish National Space Centre; Deutsches Zentrum fur Luftund Raumfahrt (DLR); Enterprise Ireland; Ministerio de Economía y Competividad; Netherlands Research School for Astronomy (NOVA); Netherlands
Organisation for Scientific Research (NWO); Science and Technology Facilities Council; Swiss Space Office; Swedish National Space Agency; and UK Space Agency. D.B. and M.M.C. are supported by Spanish MCIN/AEI/10.13039/501100011033 grant PID2019-107061GB-C61 and No. MDM-2017-0737. C.C. A.B. P.-O.L. R.G. A.C. acknowledge funding support from CNES. P.P. thanks the Swiss National Science Foundation (SNSF) for financial support under grant number 200020_200399. N.W. acknowledges funding from NSF Award 1909776 and NASA XRP Award 80NSSC22K0142. O.A. I.A. B.V. and P.R. thank the European Space Agency (ESA) and the Belgian Federal Science Policy Office (BELSPO) for their support in the framework of the PRODEX Programme. L.D. acknowledges funding from the KU Leuven Interdisciplinary Grant (IDN/19/028), the European Union H2020-MSCA-ITN-2019 under Grant no. 860470 (CHAMELEON) and the FWO research grant G086217N. I.K. acknowledges support from grant TOP-1 614.001.751 from the Dutch Research Council (NWO). O.K. acknowledges support from the Federal Ministry of Economy (BMWi) through the German Space Agency (DLR). J.P.P. acknowledges financial support from the UK Science and Technology Facilities Council, and the UK Space Agency. G. O. acknowledges support from the Swedish National Space Board and the Knut and Alice Wallenberg Foundation. P.T. acknowledges support by the European Research Council under Grant Agreement ATMO 757858. F.A.M. has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement no. 860470. L.C. acknowledges support by grant PIB2021-127718NB-100 from the Spanish Ministry of Science and Innovation/State Agency of Research MCIN/AEI/10.13039/501100011033. E.vD. acknowledges support from A-ERC grant 101019751 MOLDISK. T.P.R. acknowledges support from the ERC 743029 EASY. G.Ö. acknowledges support from SNSA. Th.H. acknowledge support from the European Research Council under the European Union's Horizon 2020 research and innovation program under grant agreement No. 832428-Origins. We thank the MIRI instrument team and the many others who contributed to the success of JWST.

**Author Contributions** All authors played a significant role in one or more of the following: designing and building MIRI, development of the original proposal, management of the project, definition of the target list and observation plan, analysis of the data, theoretical modelling and preparation of this paper. Some specific contributions are listed as follows. P.-O.L. is PI of the JWST MIRI GTO European consortium program dedicated to JWST observations of exoplanet atmospheres. D.B., P.M., and P.P. provided overall program leadership and management of the WISE J1828 working group. P.-O.L., T.H., R.W., (co-lead of the JWST MIRI GTO European consortium), D.B. and M.Mu. made significant contributions to the design of the observational program and contributed to the setting of the observing parameters. P.P., I.A., and M.S. reduced the data. P.T. generated theoretical model grids for comparison with the data. P.M., M.Mi., and N.W. fitted the generated spectrum with retrieval models, and M.V. also contributed. F.A.M. applied the radiative-convective equilibrium retrieval to the spectrum. D.B, P.M., and P.P. led the writing of the manuscript. P.-O.L. and L.D. made significant contributions to the writing of this paper. Additional contribution was provided by M.M.C. and L.D. P.B., A.B., J.B., C.C., A.C., N.C., R.G., A.G., A.M.G., S.K., F.L., D.R., P.R., S.S., and I.W. contributed to instrument construction, the program design and/or the data analysis. P.M., P.P. and D.B. generated figures for this paper. G.W. is PI of the JWST MIRI instrument, P.-O.L., T.H., M.G, B.V., L.C., E.vD., T.G., T.R., G.Os. are co-PIs, and L.D., R.W., O.A., I.K., O.K., J.P., G.Ol. and D.B. are co-Is of the JWST MIRI instrument.

**Competing Interests** The authors declare that they have no competing financial interests.

**Correspondence** Correspondence and requests for materials should be addressed to barrado@cab.inta-
csic.es.

Reprints and permissions information is available at www.nature.com/reprints
<figure><img src="image_2.png" /><figcaption>Figure 1: MIRI/MRS spectrum and exemplary best-fit model (here: pRT-free) of the Y-dwarf WISE J1828. Panel a: full MIRI wavelength range considered in our models at retrieval resolution ($\lambda/\Delta\lambda = 1000$). All other panels show the data at the original, higher MRS resolution; models have been post-processed to the same resolution. Panel b: like a, but zoomed in to show the NH$_3$ absorption band at 10 µm in more detail. Panels c to f: individual $^{15}$NH$_3$ lines in the data, including a best-fit retrieval model with and without accounting for the opacity of $^{15}$NH$_3$. The error bars shown for the observations correspond to 1-$\sigma$ confidence levels. Panel f contains two overlapping MIRI MRS sub-channels. Colored lines denote the theoretical positions of the absorption lines of H$_2$O, CH$_4$, NH$_3$ and $^{15}$NH$_3$.</figcaption></figure>
<figure><img src="image_3.png" /><figcaption>Figure 2: **Comparison of the $^{14}$N/$^{15}$N ratio in the solar neighbourhood.** The values are based on either ammonia isotopologues (orange circles) or other molecules (black symbols), in different environments, subdivided by classes$^7$. Our estimate for WISE J1828 appears as the brown dwarf class and is consistent with solar values (dashed horizontal yellow line) at the 1-2 $\sigma$ level. Lower values indicate enrichment in $^{15}$N, while the dashed blue line represents the current value of the interstellar medium (ISM).</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>Figure 3: **Different phases of the star and planetary formation.** We also show the relationship with the ammonia fractionation and the evolution of the $^{14}$N/$^{15}$N ratio at these stages: inside a molecular clouds with prestellar cores, during the formation of a protostar and in a circunstellar disk around a young star.</figcaption></figure>
Extended Data

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

Extended Data Figure 1: **The spectrum of WISE J1828 (black solid lines) and best-fit model.**
We show the MIRI/MRS spectrum of WISE J1828 (black solid lines) and best-fit model of the
regularized-P-T retrieval of petitRADTRANS (red line). Residuals (models – observed spectrum)
are displayed at the bottom panel. pRT-reg and ARCIS-reg stand for the regularized P-T retrieval
of petitRADTRANS and ARCIS, respectively.
<figure><img src="image_6.png" /></figure>

Extended Data Figure 2: **Model inferences on the various P-T profiles derived for WISE J1828.** The individual panels always highlight the constraint from one given model, while the results of the other models are shown in the background. pRT-reg and ARCIS-reg stand for the regularized P-T retrievals, while pRT-free and ARCIS-free stand for the unregularized P-T retrievals of petitRADTRANS and ARCIS, respectively. The contribution functions of the HST and MIRI observations, constrained from the best-fit pRT-reg model, are shown as dotted and dashed lines, respectively. The condensation curve for water (at solar metallicity) is shown as a blue dashdotted curve, indicating that, while neglected in our models, water clouds could impact the spectrum in a modest away.
<figure><img src="image_7.png" /><figcaption>Extended Data Figure 3: **One-dimensional projection of the posterior distributions of the WISE J1828 retrievals.** Values correspond to key atmospheric quantities shown in Extended Data Table 1. pRT-reg and ARCIS-reg stand for the regularized P-T retrievals, while pRT-free and ARCIS-free stand for the unregularized P-T retrievals of petitRADTRANS and ARCIS, respectively.</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>Extended Data Figure 4 | Evolution of the planetary $^{14}$N/$^{15}$N as a function of the mass accreted in solids (rock and ice). This computation assumes a planet that forms outside the NH$_3$ ice line but inside the N$_2$ ice line. The black dotted line denotes the value expected for pure NH$_3$ ice.</figcaption></figure>
Extended Data Table – Table 1: Physical constraints on WISE J1828

“free” in the code name means that the P-T structure was not regularized, while this was done for the “reg” cases. $R_{\text{bin}}$ model radii have been multiplied by $1/\sqrt{2}$, assuming WISE J1828 is an equal-property binary. $R_{\text{bin}}$ was used for calculating $M_{\text{bin}}$ from the inferred gravity. The units of $K_{\text{zz}}$ are cm$^2$ s$^{-1}$. “chem” means that absorber abundances have been determined from a chemical model. “solar” means that the parameter was not varied, and that a solar composition was assumed instead.

<table><thead><tr><th rowspan="2">Quantity</th><th colspan="5">Retrieval codes</th><th colspan="2">Self-consistent codes</th></tr><tr><th>pRT-free</th><th>pRT-reg</th><th>ARCiS-free</th><th>ARCiS-reg</th><th>Brewster</th><th>ARCiS+ML</th><th>ATMO</th></tr></thead><tbody><tr><td>T<sub>eff</sub> (K)</td><td>364<sup>+3</sup><sub>-3</sub></td><td>379<sup>+4</sup><sub>-4</sub></td><td>354<sup>+13</sup><sub>-7</sub></td><td>388<sup>+3</sup><sub>-4</sub></td><td>397<sup>+16</sup><sub>-14</sub></td><td>501<sup>+8</sup><sub>-8</sub></td><td>400</td></tr><tr><td>log(g)</td><td>3.83<sup>+0.08</sup><sub>-0.08</sub></td><td>4.37<sup>+0.16</sup><sub>-0.17</sub></td><td>3.38<sup>+0.1</sup><sub>-0.08</sub></td><td>4.72<sup>+0.12</sup><sub>-0.14</sub></td><td>4.74<sup>+0.19</sup><sub>-0.21</sub></td><td>5.02<sup>+0.07</sup><sub>-0.07</sub></td><td>4.0</td></tr><tr><td>R (R<sub>Jup</sub>)</td><td>1.45<sup>+0.02</sup><sub>-0.02</sub></td><td>1.35<sup>+0.03</sup><sub>-0.03</sub></td><td>1.65<sup>+0.04</sup><sub>-0.04</sub></td><td>1.35<sup>+0.03</sup><sub>-0.03</sub></td><td>1.19<sup>+0.06</sup><sub>-0.06</sub></td><td>1.38<sup>+0.02</sup><sub>-0.02</sub></td><td>1.17</td></tr><tr><td>M (M<sub>Jup</sub>)</td><td>5.76<sup>+1.04</sup><sub>-0.89</sub></td><td>17.27<sup>+6.86</sup><sub>-5.01</sub></td><td>2.69<sup>+0.58</sup><sub>-0.40</sub></td><td>38.57<sup>+10.92</sup><sub>-9.66</sub></td><td>31.50<sup>+14.30</sup><sub>-11.60</sub></td><td>79.99<sup>+12.79</sup><sub>-10.87</sub></td><td>2.76</td></tr><tr><td>R<sub>bin</sub> (R<sub>Jup</sub>)</td><td>1.02<sup>+0.02</sup><sub>-0.02</sub></td><td>0.95<sup>+0.02</sup><sub>-0.02</sub></td><td>1.17<sup>+0.03</sup><sub>-0.03</sub></td><td>0.95<sup>+0.02</sup><sub>-0.02</sub></td><td>0.84<sup>+0.04</sup><sub>-0.04</sub></td><td>0.98<sup>+0.01</sup><sub>-0.01</sub></td><td>0.83</td></tr><tr><td>M<sub>bin</sub> (M<sub>Jup</sub>)</td><td>2.88<sup>+0.52</sup><sub>-0.45</sub></td><td>8.63<sup>+3.43</sup><sub>-2.51</sub></td><td>1.34<sup>+0.29</sup><sub>-0.2</sub></td><td>19.29<sup>+5.46</sup><sub>-4.83</sub></td><td>15.75<sup>+7.15</sup><sub>-5.8</sub></td><td>39.99<sup>+6.4</sup><sub>-5.43</sub></td><td>1.38</td></tr><tr><td>[M/H]</td><td>-0.07<sup>+0.02</sup><sub>-0.02</sub></td><td>0.06<sup>+0.04</sup><sub>-0.04</sub></td><td>-0.34<sup>+0.03</sup><sub>-0.03</sub></td><td>0.10<sup>+0.04</sup><sub>-0.04</sub></td><td>-0.08<sup>+0.10</sup><sub>-0.09</sub></td><td>0.14<sup>+0.02</sup><sub>-0.03</sub></td><td>solar</td></tr><tr><td>C/O</td><td>0.21<sup>+0.01</sup><sub>-0.01</sub></td><td>0.20<sup>+0.02</sup><sub>-0.02</sub></td><td>0.22<sup>+0.02</sup><sub>-0.02</sub></td><td>0.17<sup>+0.02</sup><sub>-0.02</sub></td><td>0.73<sup>+0.08</sup><sub>-0.10</sub></td><td>0.29<sup>+0.01</sup><sub>-0.01</sub></td><td>solar</td></tr><tr><td>(N/O) /<br>(N/O)<sub>☉</sub></td><td>0.091<sup>+0.004</sup><sub>-0.004</sub></td><td>0.096<sup>+0.006</sup><sub>-0.006</sub></td><td>0.107<sup>+0.006</sup><sub>-0.006</sub></td><td>0.097<sup>+0.006</sup><sub>-0.006</sub></td><td>0.314<sup>+0.036</sup><sub>-0.032</sub></td><td>0.117<sup>+0.006</sup><sub>-0.007</sub></td><td>solar</td></tr><tr><td><sup>14</sup>N/<sup>15</sup>N</td><td>560<sup>+165</sup><sub>-115</sub></td><td>642<sup>+365</sup><sub>-192</sub></td><td>949<sup>+322</sup><sub>-208</sub></td><td>591<sup>+432</sup><sub>-190</sub></td><td>—</td><td>—</td><td>—</td></tr><tr><td>log(H<sub>2</sub>O)</td><td>-3.03<sup>+0.02</sup><sub>-0.02</sub></td><td>-2.89<sup>+0.04</sup><sub>-0.04</sub></td><td>-3.23<sup>+0.03</sup><sub>-0.03</sub></td><td>-2.84<sup>+0.04</sup><sub>-0.04</sub></td><td>-3.23<sup>+0.10</sup><sub>-0.10</sub></td><td>chem</td><td>chem</td></tr><tr><td>log(CH<sub>4</sub>)</td><td>-3.72<sup>+0.03</sup><sub>-0.03</sub></td><td>-3.61<sup>+0.07</sup><sub>-0.06</sub></td><td>-3.88<sup>+0.03</sup><sub>-0.03</sub></td><td>-3.60<sup>+0.06</sup><sub>-0.06</sub></td><td>-3.36<sup>+0.10</sup><sub>-0.09</sub></td><td>chem</td><td>chem</td></tr><tr><td>log(NH<sub>3</sub>)</td><td>-4.93<sup>+0.02</sup><sub>-0.02</sub></td><td>-4.77<sup>+0.06</sup><sub>-0.06</sub></td><td>-5.06<sup>+0.03</sup><sub>-0.02</sub></td><td>-4.71<sup>+0.05</sup><sub>-0.05</sub></td><td>-4.58<sup>+0.10</sup><sub>-0.10</sub></td><td>chem</td><td>chem</td></tr><tr><td>log(<sup>15</sup>NH<sub>3</sub>)</td><td>-7.67<sup>+0.10</sup><sub>-0.11</sub></td><td>-7.58<sup>+0.17</sup><sub>-0.21</sub></td><td>-8.03<sup>+0.11</sup><sub>-0.13</sub></td><td>-7.49<sup>+0.18</sup><sub>-0.25</sub></td><td>—</td><td>—</td><td>—</td></tr><tr><td>log(K<sub>zz</sub>)</td><td>—</td><td>—</td><td>—</td><td>—</td><td>—</td><td>9.01<sup>+0.19</sup><sub>-0.19</sub></td><td>7</td></tr></tbody></table>
Extended Data – Table 2: **Physical constraints on WISE J1828, combining different codes**

$R_{\text{bin}}$ model radii have been multiplied by $1/\sqrt{2}$, assuming WISE J1828 is an equal-property binary. $R_{\text{bin}}$ was used for calculating $M_{\text{bin}}$ from the inferred gravity. The units of $K_{\text{zz}}$ are cm$^2$ s$^{-1}$. “chem” means that absorber abundances have been determined from a chemical model. “no comb” means that the respective parameter was only varied in one of the two codes, please see Extended Data Table 1 for the inferred values. * for the inferred average mass denotes that the distance between the two codes’ solutions was larger than the average value, so no uncertainties, derived as explained in the method section, are given here.

<table><thead><tr><th>Quantity</th><th>Retrievals</th><th>Self-consistent codes</th></tr></thead><tbody><tr><td>$T_{\text{eff}}$ (K)</td><td>378<sup>+13</sup><sub>-18</sub></td><td>450 ± 101</td></tr><tr><td>log(g)</td><td>4.34<sup>+0.42</sup><sub>-0.88</sub></td><td>4.5 ± 1.0</td></tr><tr><td>$R$ (R<sub>Jup</sub>)</td><td>1.37<sup>+0.26</sup><sub>-0.13</sub></td><td>1.27 ± 0.21</td></tr><tr><td>$M$ (M<sub>Jup</sub>)</td><td>15.8<sup>+22.82</sup><sub>-12.64</sub></td><td>41*</td></tr><tr><td>$R_{\text{bin}}$ (R<sub>Jup</sub>)</td><td>0.97<sup>+0.18</sup><sub>-0.09</sub></td><td>0.90 ± 0.15</td></tr><tr><td>$M_{\text{bin}}$ (M<sub>Jup</sub>)</td><td>7.91<sup>+11.33</sup><sub>-6.34</sub></td><td>21*</td></tr><tr><td>[M/H]</td><td>-0.05<sup>+0.15</sup><sub>-0.27</sub></td><td>no comb</td></tr><tr><td>C/O</td><td>0.21<sup>+0.45</sup><sub>-0.03</sub></td><td>no comb</td></tr><tr><td>(N/O) /<br>(N/O)<sub>☉</sub></td><td>0.10<sup>+0.19</sup><sub>-0.01</sub></td><td>no comb</td></tr><tr><td><sup>14</sup>N/<sup>15</sup>N</td><td>673<sup>+393</sup><sub>-212</sub></td><td>–</td></tr><tr><td>log(H<sub>2</sub>O)</td><td>-3.03<sup>+0.18</sup><sub>-0.21</sub></td><td>chem</td></tr><tr><td>log(CH<sub>4</sub>)</td><td>-3.65<sup>+0.21</sup><sub>-0.21</sub></td><td>chem</td></tr><tr><td>log(NH<sub>3</sub>)</td><td>-4.79<sup>+0.15</sup><sub>-0.25</sub></td><td>chem</td></tr><tr><td>log(<sup>15</sup>NH<sub>3</sub>)</td><td>-7.68<sup>+0.24</sup><sub>-0.34</sub></td><td>–</td></tr><tr><td>log(K<sub>zz</sub>)</td><td>–</td><td>8 ± 2</td></tr></tbody></table>