# Comparing emission- and absorption-based gas-phase metallicities in GRB host galaxies at z = 2-4 using JWST

P. Schady, R. M. Yates, L. Christensen, A. de Cia, A. Rossi, V. d'Elia, K. E. Heintz, P. Jakobsson, T. Laskar, A. Levan, et al.

► To cite this version:

P. Schady, R. M. Yates, L. Christensen, A. de Cia, A. Rossi, et al. Comparing emission- and absorption-based gas-phase metallicities in GRB host galaxies at z = 2-4 using JWST. Monthly Notices of the Royal Astronomical Society, 2024, 529, pp.2807-2831. 10.1093/mnras/stae677. insu-04821671

HAL Id: insu-04821671

https://insu.hal.science/insu-04821671v1

Submitted on 5 Dec 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
# Comparing emission- and absorption-based gas-phase metallicities in GRB host galaxies at $z = 2–4$ using JWST

P. Schady<sup>1,★</sup> R. M. Yates<sup>1</sup>,<sup>2</sup> L. Christensen,<sup>3,4</sup> A. De Cia,<sup>5,6</sup> A. Rossi<sup>1</sup>,<sup>7</sup> V. D'Elia,<sup>8,9</sup> K. E. Heintz<sup>1</sup>,<sup>3,4</sup>

P. Jakobsson,<sup>10</sup> T. Laskar<sup>1</sup>,<sup>11</sup> A. Levan,<sup>12</sup> R. Salvaterra,<sup>13</sup> R. L. C. Starling<sup>1</sup>,<sup>14</sup> N. R. Tanvir,<sup>14</sup>

C. C. Thöne,<sup>15</sup> S. Vergani,<sup>16,17</sup> K. Wiersema,<sup>2</sup> M. Arabsalmani,<sup>18,19</sup> H.-W. Chen,<sup>20</sup> M. De Pasquale,<sup>21</sup>

A. Fruchter,<sup>22</sup> J. P. U. Fynbo,<sup>3,4</sup> R. García-Benito<sup>1</sup>,<sup>23</sup> B. Gompertz<sup>1</sup>,<sup>24,25</sup> D. Hartmann,<sup>26</sup>

C. Kouveliotou,<sup>27</sup> B. Milvang-Jensen<sup>1</sup>,<sup>3,4</sup> E. Palazzi,<sup>7</sup> D. A. Perley<sup>1</sup>,<sup>28</sup> S. Piranomonte,<sup>9</sup> G. Pugliese,<sup>29</sup>

S. Savaglio,<sup>7,30,31</sup> B. Sbarufatti<sup>1</sup>,<sup>32</sup> S. Schulze<sup>1</sup>,<sup>33</sup> G. Tagliaferri,<sup>32</sup> A. de Ugarte Postigo,<sup>34</sup> D. Watson,<sup>3,4</sup>
and P. Wiseman<sup>35</sup>

*Affiliations are listed at the end of the paper*

Accepted 2024 February 26. Received 2024 February 12; in original form 2023 October 30

## ABSTRACT

Much of what is known of the chemical composition of the universe is based on emission line spectra from star-forming galaxies. Emission-based inferences are, nevertheless, model-dependent and they are dominated by light from luminous star-forming regions. An alternative and sensitive probe of the metallicity of galaxies is through absorption lines imprinted on the luminous afterglow spectra of long gamma ray bursts (GRBs) from neutral material within their host galaxy. We present results from a JWST/NIRSpec programme to investigate for the first time the relation between the metallicity of neutral gas probed in absorption by GRB afterglows and the metallicity of the star-forming regions for the same host galaxy sample. Using an initial sample of eight GRB host galaxies at $z = 2.1–4.7$, we find a tight relation between absorption and emission line metallicities when using the recently proposed $\hat{R}$ metallicity diagnostic ($\pm0.2$ dex). This agreement implies a relatively chemically homogeneous multiphase interstellar medium and indicates that absorption and emission line probes can be directly compared. However, the relation is less clear when using other diagnostics, such as $R_{23}$ and $R_3$. We also find possible evidence of an elevated N/O ratio in the host galaxy of GRB 090323 at $z = 4.7$, consistent with what has been seen in other $z > 4$ galaxies. Ultimate confirmation of an enhanced N/O ratio and of the relation between absorption and emission line metallicities will require a more direct determination of the emission line metallicity via the detection of temperature-sensitive auroral lines in our GRB host galaxy sample.

**Key words:** gamma-ray burst: general-ISM: abundances-galaxies: abundances-galaxies: high-redshift-galaxies: ISM-quasars: absorption lines.

## 1 INTRODUCTION

The chemical enrichment of galaxies across cosmic time en-
codes vital information on galaxy evolution, tracing the succes-
sive episodes of star formation that synthesize and recycle met-
als back into the galactic interstellar medium (ISM). Galaxy-
scale outflows and accretion of pristine gas further redistributes
and dilutes enriched material. Tracing the metallicity of the
multiphase ISM of galaxies thus enables the relative impor-
tance of these competing processes in enriching a galaxy to be
studied.

The majority of gas-phase metallicity measurements of galaxies
are based on emission lines, which trace the ionized gas within star-

forming regions. In such a case, the most direct method available
to trace the gas phase metallicity is using metal recombination
lines (e.g. Osterbrock 1989; Peimbert, Storey & Torres-Peimbert
1993), which are relatively unaffected by temperature fluctuations.
However, they are extremely faint (~10³ times fainter than the
hydrogen recombination line, Hβ), limiting this method to only the
highest-resolution spectra of nearby systems (e.g. Esteban et al. 2009,
2014). Alternatively, measurements of the electron temperature (T_e)
can also provide (semi-)direct metallicity estimates (e.g. Peimbert
1967; Osterbrock 1989). This method requires metal auroral lines
such as [O III]\4363, which although still faint (~10² times fainter
than Hβ), are ten times brighter than metal recombination lines and
are thus detectable in a wider range of systems in the nearby Universe,
or in gravitationally lensed galaxies out to z ≈ 3.6 (e.g. Villar-Martín,
Cerviño & González Delgado 2004; Christensen et al. 2012; Sanders
et al. 2016). Oxygen auroral lines have now also been detected out

<footnote>* E-mail: p.schady@bath.ac.uk</footnote>
to $z \sim 8$ for a few galaxies with the JWST (e.g. Arellano-Córdova et al. 2022; Schaerer et al. 2022; Nakajima et al. 2023; Rhoads et al. 2023; Trump et al. 2023; Curti et al. 2023b; Heintz et al. 2023b), but these remain the exception.

In the absence of metal recombination or auroral lines, indirect metallicity estimates of star-forming regions must be used, which are obtained via strong emission line ratios (e.g. Kewley & Dopita 2002; Pettini & Pagel 2004; Pilyugin & Grebel 2016). Calibrations for such diagnostics are now becoming possible at high redshift (e.g. Hirschmann, Charlot & Somerville 2023; Laseter et al. 2023; Sanders et al. 2024). However, strong-line metallicity estimates are known to vary by up to ~0.6 dex depending on the line ratios chosen (Kewley & Ellison 2008; Teimoorinia et al. 2021). Moreover, all such emission line methods are luminosity-weighted tracers of the star-forming regions of galaxies, which at $z > 2$ contain just 20 per cent of the baryon fraction (Fukugita & Peebles 2004; Behroozi, Conroy & Wechsler 2010; McGaugh et al. 2010; Peebles et al. 2014).

A very different but complementary method of studying the cosmic build up of heavy elements is with absorption lines from the cold ISM, using the luminous light offered by background quasi-stellar objects (QSOs) and long gamma ray bursts (GRBs). Absorption from neutral hydrogen reveals copious quantities of neutral gas in these systems (e.g. Tanvir et al. 2019), in the large majority of cases classifying them as damped Lyman-$\alpha$ (Ly $\alpha$) absorbers (DLAs, defined as having $\log[N_{HI}/\text{cm}^{-2}] > 20.3$; see Wolfe, Gawiser & Prochaska 2005), where ionization corrections are negligible. Combining the neutral hydrogen abundance with the measured abundances of metals provides an accurate and largely model-independent measure of the neutral gas metallicity (Savaglio, Fall & Fiore 2003; Prochaska et al. 2003a; Prochaska, Castro & Djorgovski 2003b; Wolfe, Gawiser & Prochaska 2005; Savaglio 2006; Fynbo et al. 2011; Rafelski et al. 2012; Krogager et al. 2013; Neeleman et al. 2013). Such data have enabled abundances to be measured out to $z > 6$ (Kawai et al. 2006; Thöne et al. 2013; Hartoog et al. 2015; Saccardi et al. 2023) and a few dex below what can be probed with emission lines (De Cia et al. 2013; Wiseman et al. 2017; Bolmer et al. 2019; Péroux & Howk 2020). The combination of absorption and emission line probes can therefore provide a more complete understanding of the chemical enrichment of galaxies.

Extensive efforts have been made to identify the emission counterparts to QSO-DLAs, but the often large, projected offsets of tens of kpc between the QSO line of sight and the centre of the galaxy associated with the absorber (or 'impact parameter') (e.g Chen, Kennicutt & Rauch 2005; Rao, Turnshek & Nestor 2006; Krogager et al. 2012; Rahmani et al. 2016) make it challenging to identify the intervening system in emission (e.g. Fumagalli et al. 2015). Detecting emission counterparts at smaller impact parameters is also complex due to the bright light from the background QSO. Thus despite there now being on the order of a few hundred QSO-DLAs with measured absorption metallicities (Berg et al. 2015; De Cia et al. 2016, 2018), of these, the emission line metallicity (or limits) has only been reported for 20–30 QSO-DLA emission counterparts (Christensen et al. 2014; Rahmani et al. 2016; Weng et al. 2023), most of which are at $z < 2$. The measured emission line metallicities are generally larger than the absorption-based metallicities, although it remains unclear whether this offset is a result of a difference in the phase or in the location of the gas probed, or the presence of systematics. The QSO-DLA towards SBS 1544+5912 has an impact parameter of just 1 kpc (Rahmani et al. 2016), and in this case the emission and absorption

line metallicities were consistent within the uncertainties (Schultel-Ladbeck et al. 2004, 2005).

Unlike QSO-DLAs, long GRBs fade, enabling even faint host galaxies to be observed in emission. Furthermore, their association to the death of a massive star<fnref n="1" /> (Galama et al. 1998; Hjorth et al. 2003; Woosley & Bloom 2006) offer a sightline that pierces through the same star-forming regions that dominate emission-line spectra (e.g. Fruchter et al. 2006; Wiersema et al. 2007; Krühler et al. 2017). The closest absorbing clouds have been found to typically lie at a distance of just a few hundred parsec from the GRB (Vreeswijk et al. 2007, 2013; D'Elia et al. 2014; although see Saccardi et al. 2023), which is far smaller than typical QSO-DLA impact parameters and places the absorbing material within the galaxy ISM. Any difference between emission and absorption line metallicities in the case of GRB host galaxies would therefore reflect differences in the chemical enrichment of the multiphase ISM.

Prior to the launch of JWST, only the host galaxy of GRB 121024A at $z = 2.298$ (Friis et al. 2015) had a well-measured absorption line metallicity together with an emission line metallicity. This is due to the need for restframe optical galaxy spectroscopy to capture the emission lines required for the metallicity diagnostic (e.g. Krühler et al. 2015; Palmerio et al. 2019; Graham, Schady & Fruchter 2023) as well as rest-frame UV GRB afterglow spectra for deriving the absorption metallicity. Ly $\alpha$ absorption can only be detected from the ground for GRBs at $z \gtrsim 2$, but at such redshifts it becomes challenging to detect the weaker emission lines from the same host galaxies. In the case of GRB 121024A, the emission line metallicity was larger than the absorption metallicity by 0.2–0.7 dex (Friis et al. 2015; Krühler et al. 2015). Deriving emission metallicities at higher redshifts ($z \gtrsim 2$) from direct observations of the host galaxies requires near-infrared spectroscopy.

It is only now, with the sensitivity and near-infrared coverage of JWST, that it is possible to obtain sensitive emission-line data at wavelengths out to $H\alpha$ for a sample of GRB hosts with well-constrained absorption line metallicities. In this paper, we report results from a cycle-1 JWST NIRSpec program (PI: P. Schady, ID 2344) to measure emission line metallicities for a subset of 10 GRB host galaxies at $2.1 < z < 4.7$ that have accurately measured ($<0.1$ dex) absorption line metallicities. In Section 2, we describe our sample and provide details on our NIRSpec observations, followed by our data analysis in Section 3. We present our results in Section 4, and in Section 5, we discuss the implications of our analysis on the relation between emission and absorption metallicity probes. All uncertainties are given as $1\sigma$ unless otherwise stated and we assume a standard Lambda cold dark matter ($\Lambda$CDM) cosmological model with $\Omega_M = 0.31$, $\Omega_\Lambda = 0.69$, and $H_0 = 67.8 \text{ km s}^{-1} \text{ Mpc}^{-1}$ (Planck Collaboration et al. 2016).

## 2 JWST GRB HOST GALAXY SAMPLE

There are around 30 GRBs with an afterglow absorption line metallicity measured with a statistical uncertainty of better than

<footnote n="1">¹The detection of a kilonova associated with the long GRB 211211A and GRB 230307A has shown that not all long GRBs are formed from the core collapse of a massive star (e.g. Rastinejad et al. 2022; Troja et al. 2022; Gompertz et al. 2023; Levan et al. 2023). Nevertheless, the majority of long GRB at $z < 1$ that are followed up show supernova (SN) features in their light curves and/or spectra (e.g. Cano et al. 2017).</footnote>
<table><caption>**Table 1.** GRB host galaxy sample and details on JWST/NIRSpec observations.</caption><thead><tr><th>GRB</th><th>E(B-V)<sub>Gal</sub></th><th>Grating/filter combination</th><th>On-source exposure (s)</th><th>Obs. date (DD-MM-YY)</th></tr></thead><tbody><tr><td rowspan="2">030323</td><td rowspan="2">0.042</td><td>G140M/F100LP</td><td>4204</td><td rowspan="2">13-06-23</td></tr><tr><td>G235M/F170LP</td><td>1225</td></tr><tr><td rowspan="2">050505</td><td rowspan="2">0.019</td><td>G235M/F170LP</td><td>2101</td><td rowspan="2">18-03-24 – 04-05-24<sup>†</sup></td></tr><tr><td>G395M/F290LP</td><td>642</td></tr><tr><td rowspan="2">050820A*</td><td rowspan="2">0.039</td><td>G140M/F100LP</td><td>5310</td><td rowspan="2">28-11-22</td></tr><tr><td>G235M/F170LP</td><td>905</td></tr><tr><td rowspan="2">080804</td><td rowspan="2">0.014</td><td>G140M/F100LP</td><td>934</td><td rowspan="2">28-10-22</td></tr><tr><td>G235M/F170LP</td><td>525</td></tr><tr><td>090323</td><td>0.021</td><td>G235M/F170LP</td><td>934</td><td>19-06-23</td></tr><tr><td rowspan="2">100219A</td><td rowspan="2">0.066</td><td>G235M/F170LP</td><td>5952</td><td rowspan="2">20-01-24</td></tr><tr><td>G395M/F290LP</td><td>934</td></tr><tr><td rowspan="2">120327A</td><td rowspan="2">0.293</td><td>G140M/F100LP</td><td>934</td><td rowspan="2">07-03-23</td></tr><tr><td>G235M/F170LP</td><td>525</td></tr><tr><td rowspan="2">120815A</td><td rowspan="2">0.099</td><td>G140M/F100LP</td><td>5952</td><td rowspan="2">24-08-23</td></tr><tr><td>G235M/F170LP</td><td>1517</td></tr><tr><td rowspan="2">141109A</td><td rowspan="2">0.032</td><td>G140M/F100LP</td><td>934</td><td rowspan="2">02-12-23</td></tr><tr><td>G235M/F170LP</td><td>525</td></tr><tr><td rowspan="2">150403A*</td><td rowspan="2">0.047</td><td>G140M/F100LP</td><td>934</td><td rowspan="2">19-06-23</td></tr><tr><td>G235M/F170LP</td><td>642</td></tr></tbody></table>

* Observed with the IFS

† Window given for when target due to be observed

<table><caption>**Table 2.** GRB host nebular line fluxes corrected for Milky Way dust extinction.</caption><thead><tr><th rowspan="2">GRB host</th><th rowspan="2">z<sub>abs</sub></th><th rowspan="2">z<sub>em</sub></th><th colspan="6">Line Flux (10<sup>-17</sup> erg cm<sup>-2</sup> s<sup>-1</sup>)</th></tr><tr><th>Hβ</th><th>Hα</th><th>[O II]λλ3726,3729</th><th>[O III]λ4959</th><th>[O III]λ5007</th><th>[N II]λ6584</th><th>[S II]λλ6717,6731</th></tr></thead><tbody><tr><td>030323</td><td>3.372<sup>a</sup></td><td>3.3710</td><td>0.17 ± 0.06</td><td>0.43 ± 0.04</td><td>0.11 ± 0.05</td><td>0.27 ± 0.06</td><td>0.73 ± 0.06</td><td>...</td><td>...</td></tr><tr><td>050820A</td><td>2.615<sup>b,c</sup></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>galaxy-integrated</td><td></td><td>2.6133</td><td>2.49 ± 0.13</td><td>8.81 ± 0.22</td><td>4.56 ± 0.36</td><td>5.71 ± 0.13</td><td>16.06 ± 0.15</td><td>...</td><td>...</td></tr><tr><td>component A</td><td></td><td>2.6129</td><td>0.82 ± 0.05</td><td>3.17 ± 0.11</td><td>1.67 ± 0.08</td><td>2.04 ± 0.06</td><td>4.95 ± 0.06</td><td>...</td><td>...</td></tr><tr><td>component B</td><td></td><td>2.6133</td><td>1.20 ± 0.10</td><td>4.12 ± 0.09</td><td>2.05 ± 0.10</td><td>2.84 ± 0.11</td><td>8.49 ± 0.12</td><td>...</td><td>...</td></tr><tr><td>component C</td><td></td><td>2.6136</td><td>0.31 ± 0.04</td><td>1.02 ± 0.12</td><td>0.74 ± 0.07</td><td>0.44 ± 0.03</td><td>1.55 ± 0.04</td><td>...</td><td>...</td></tr><tr><td>080804</td><td>2.205<sup>d</sup></td><td>2.2065</td><td>0.40 ± 0.18</td><td>2.35 ± 0.23</td><td>1.01 ± 0.64</td><td>1.02 ± 0.18</td><td>2.59 ± 0.18</td><td>...</td><td>...</td></tr><tr><td>090323</td><td>3.57<sup>e,f</sup></td><td>3.5844</td><td>1.52 ± 0.10</td><td>6.44 ± 0.13</td><td>1.94 ± 0.48</td><td>1.54 ± 0.10</td><td>5.24 ± 0.11</td><td>1.67 ± 0.12</td><td>0.86 ± 0.12</td></tr><tr><td>100219A</td><td>4.667<sup>g</sup></td><td>4.6698</td><td>0.06 ± 0.01</td><td>0.09 ± 0.03</td><td>&lt;0.03</td><td>0.06 ± 0.01</td><td>0.20 ± 0.01</td><td>...</td><td>...</td></tr><tr><td>150403A</td><td>2.057<sup>h</sup></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>galaxy-integrated</td><td></td><td>2.0570</td><td>2.25 ± 0.32</td><td>6.07 ± 0.37</td><td>3.99 ± 0.54</td><td>2.99 ± 0.33</td><td>9.14 ± 0.38</td><td>...</td><td>...</td></tr><tr><td>component A</td><td></td><td>2.0570</td><td>0.94 ± 0.16</td><td>1.77 ± 0.16</td><td>1.11 ± 0.27</td><td>1.10 ± 0.16</td><td>2.88 ± 0.18</td><td>...</td><td>...</td></tr><tr><td>component B</td><td></td><td>2.0567</td><td>1.13 ± 0.21</td><td>3.93 ± 0.36</td><td>2.64 ± 0.66</td><td>1.07 ± 0.21</td><td>4.01 ± 0.24</td><td>...</td><td>...</td></tr><tr><td>component C</td><td></td><td>2.0576</td><td>0.25 ± 0.11</td><td>1.30 ± 0.16</td><td>0.75 ± 0.22</td><td>0.76 ± 0.12</td><td>2.27 ± 0.14</td><td>...</td><td>...</td></tr></tbody></table>

<sup>a</sup> Vreeswijk et al. (2004); <sup>b</sup> Prochaska et al. (2007a); <sup>c</sup> Ledoux et al. (2009); <sup>d</sup> Thöne et al. (2008); <sup>e</sup> Chornock et al. (2009); <sup>f</sup> Savaglio et al. (2012); <sup>g</sup> Thöne et al. (2013); <sup>h</sup> Selsing et al. (2019)

0.25 dex (Wiseman et al. 2017; Bolmer et al. 2019; Heintz et al. 2023a). From this parent sample we selected those host galaxies with measured UV/optical star formation rates (SFRs) from UV continuum or emission line fluxes, but without the necessary spectra to measure a metallicity. This left us with a sample of 15 GRB host galaxies. We then further down-selected the sample to only include those GRB host galaxies with an estimated Hα flux brighter than 3.5 × 10<sup>-18</sup> erg cm<sup>-2</sup> s<sup>-1</sup> based on the SFR, leaving us with a final sample of 10 long GRB host galaxies. This flux limit was set by our requirement to measure strong emission lines at wavelengths spanning from [O II]λλ3726,3729 to Hα with S/N>5 in less than 4 h (including overheads) according to the JWST exposure time calculator, above which the data volume exceeds the

middle threshold set by JWST when using the NIRSIR2RAPID readout pattern.<sup>2</sup>

Our GRB host galaxy sample and the details of the JWST/NIRSpec observations are given in Table 1. The detection of Ly α absorption in the optical afterglow spectrum is necessary in order to be able to measure the metallicity in absorption (see 3.4 for details), and this requirement imposes a hard lower bound on the redshift of z > 2 for the sample. It should be noted that our need for an accurate absorption line metallicity in our selection criteria biases our sample against more metal-rich and thus dusty host galaxies, which significantly

<footnote n="2"><sup>2</sup>jwst-docs.stsci.edu/jwst-general-support</footnote>
attenuate the afterglow spectrum. In addition, the requirement that our host galaxies were previously detected in emission, either in imaging or spectra, introduces a preference for the brightest, and thus most star-forming galaxies of those with accurate absorption metallicities. The redshift range spanned by our final sample is $z = 2.1–4.7$ (Table 2), and the absorption line metallicities range from 0.04 to $2.5 Z_⊙$.

## 3 OBSERVATIONS AND DATA ANALYSIS

Our sample of GRB host galaxies were all observed with NIRSpec (Jakobsen et al. 2022), two using the integral field spectrograph (IFS) and the rest with the S400A fixed slit.

The host galaxies of GRB 050820A and GRB 150403A showed evidence of spatially extended emission in the available imaging data, and NIRSpec observations were therefore performed using the IFS, which has a $3 × 3$ arcsec$^2$ field of view. For the same given object, longer exposures are required in IFS mode than with the fixed slit to reach the same integrated line flux sensitivity, which is why we only used the IFS in cases where there was evidence of extended emission. For both these GRB host galaxies the G140M/F100LP and G235M/F170LP grating and filter combinations were used, corresponding to a spectral resolution of $R \sim 1000$. In the case of GRB 050820A, previous *Hubble Space Telescope* (HST) imaging data showed that the host galaxy consists of at least two components separated by <1''5 (12.3 kpc physical size; Chen 2012), and the galaxy complex was therefore sufficiently compact to be able to perform a two-point nod to cover both components and additionally sample the sky background. For GRB 150403A, pre-imaging data were available with the GRB Optical and Near-infrared Detector (GROND; Greiner et al. 2008) mounted on the 2.2 m Max Planck Institute telescope in La Silla, Chile. From these data the host galaxy appeared extended over ~2 arcsec (17.1 kpc physical size), and thus a four-point dither was used instead of nodding to avoid any of the galaxy falling out of the $3 × 3$ arcsec$^2$ NIRSpec field of view during a nod. The reduced and flux calibrated IFS data were downloaded from the Mikulski Archive for Space Telescopes (MAST) Data Discovery Portal.<fnref n="3" /> The *QFitsView*<fnref n="4" /> software package was used to visualize the cubes and to extract stacked spectra and corresponding uncertainties from the regions of interest. For the remaining eight GRB host galaxies in our sample observed with the NIRSpec S400A fixed slit, a two-point nod pattern was used. The reduced and combined 2D spectra were similarly downloaded from MAST. All downloaded data were reduced with version 11.17.2 of the CRDS file selection software, using context jwst_1140.pmap. The galaxies appear compact in the 2D spectra but in some cases they are resolved. The 1D spectra were extracted manually using the JWST *Extract1DStep* python function (v1.8.3), applying an extraction region centred on the detectable line emission and with a width 0.7–0.9.

The resolving power of NIRSpec is in the range $R = 350–1400$ in the G140M grating, corresponding to a velocity dispersion $\sigma = 90–360$ km s$^{-1}$, and in the G235M grating it is $R = 630–1500$ or $\sigma = 80–200$ km s$^{-1}$. The typical intrinsic line velocities measured in our sample are $\sigma \sim 50–150$ km s$^{-1}$ after accounting for the line spread function. The emission lines in the 1D spectra are generally well fit by a single Gaussian component, with the exception of the [N II]λλ6549,6584 and Hα emission lines from the host galaxy of

<figure><img src="image_2.png" /><figcaption>**Figure 1.** Surface brightness (SB) map of the G140M/L100LP NIRSpec IFS observations of the host galaxy of GRB 050820A at $z_{abs} = 2.615$ centred on [O III]λ5007. A number of resolved emission regions are detected, including components A and B identified in Chen (2012) and labelled in the image above. The position of the GRB afterglow is indicated with an ‘X’, which lies close to a third emission component, labelled here as C. Additional emission can also be seen to the left of region C, which is only detected at $1.79\mu$m, consistent with [O III]λ5007 at $z = 2.615$. However no corresponding emission from [O III]λ4959 or Hα at this same redshift is detected at this location. The image is orientated with north up and east left. The pixel scale of the image is 0.1'1, and the offset from the image centre in kpc is indicated along the axes. Observations were taken with a two-point dither, which is why the shape of the field of view comprises two overlapping squares.</figcaption></figure>

GRB 090323, where there is evidence of additional emission that likely originates from unresolved additional components in velocity space (Section 3.3). The current version of Extract1DStep fails to provide a flux uncertainty, which is due to the relevant flat field reference files not having an associated variance array. New flat fields are required to resolve this problem, and for now the recommendation provided on the JWST webpages<fnref n="5" /> is to calculate the flux error by summing in quadrature the contribution from the Poisson noise and read-out noise alone, which are available in the extracted 1D spectral file. In the remainder of this section we describe the JWST observations and data analysis process for each of the GRB host galaxies in our sample, beginning with the two targets with IFS observations.

### 3.1 IFS observations

#### 3.1.1 GRB 050820A

Level 3 data show clear emission from Hα, Hβ, [O II]λλ3726,3729 and [O III]λλ4959,5007 at an observer wavelength consistent with the GRB afterglow absorption redshift ($z = 2.6147$; Ledoux et al. 2005; Prochaska et al. 2007b; Fox et al. 2008) (see Fig. A1). An image of the G140M/F100LP NIRSpec data cube centred at the redshifted [O III]λ5007 line is shown in Fig. 1, where a galaxy complex made up of numerous emission components can be seen. Spectroscopic observations of this host galaxy were previously taken using the Folded port InfraRed Echellette (FIRE) spectrograph on the Magellan Baade Telescope, covering the wavelength range 0.8–

<footnote n="3">³mast.stsci.edu/portal/Mashup/Clients/Mast/Portal.html</footnote>

<footnote n="4">⁴www.mpe.mpg.de/~ott/QFitsView</footnote>

<footnote n="5">⁵jwst-docs.stsci.edu/jwst-calibration-pipeline-caveats</footnote>
<figure><img src="image_3.png" /><figcaption>**Figure 2.** Surface brightness (SB) map of the G140M/L100LP IFS observations of the host galaxy of GRB 150403A centred on [O III]λ5007 at z = 2.057. A number of resolved emission regions are detected, and the labels A, B, and C indicate the regions where stacked spectra have been extracted. Region B is itself resolved into multiple components. The position of the GRB afterglow is just west of component C, marked with a ‘X’, and the corresponding 1σ positional uncertainty is indicated with the white dashed circle. Note that no background subtraction has been applied and the colour bar thus does not go down to zero. The image is oriented with north up and east left. The pixel scale of the image is 0.′1, and the offset from the image centre in kpc is indicated along the axes.</figcaption></figure>

2.5µm with a spectral resolution of ~50 km s⁻¹ (Chen 2012). In line with the naming convention used in Chen (2012), we refer to the upper, northern component as component A, and the lower, southern component as component B, which are separated by a projected distance of ~13 kpc, consistent with the HST observations (Chen 2012). The GRB projected position was located between components A and B, and is indicated by an ‘X’ in Fig. 1, which lies on a third emission component seen in Fig. 1, which we have identified as C. The absolute astrometry of the JWST image is limited by the JWST pointing accuracy, which is 0.′1, corresponding to a single NIRSpec pixel. Component C is not the brightest region of its host galaxy (see Table 2), but it nevertheless has a high SFR (see Section 3.3 and Table 4). This is in line with what is observed at z < 1, with long GRBs tracing, on average, some of the brightest regions of their host galaxy (Fruchter et al. 2006), even if not the brightest (e.g. GRB 980425 Christensen et al. 2008; Krühler et al. 2017). The environmental properties at the position of the GRB will be presented in greater detail in Topçu et al. (in prepration). An intervening absorption system was detected in the GRB afterglow at z = 2.3597 (Ledoux et al. 2005; Vergani et al. 2009), but no emission lines of this intervening system are detected in the NIRSpec data cube.

Spectra of the stacked pixels within each of the A, B and C components were extracted within QFitsView, as well as a spectrum of all emission host galaxy regions combined (see Table 2). Component A is the brightest of the host galaxy complex, and the velocity dispersion for all three components is consistent within 2σ, although in the case of component C we only measure an upper limit (<98 km s⁻¹, corresponding to the instrument resolution at 1.8 µm).

After applying the barycentric correction to the measured radial velocities, the Gaussian fits to the Hα, Hβ and [O III]λλ4959,5007 doublet give a best-fitting redshift of z = 2.6129 ± 0.0001 for component A, z = 2.6133 ± 0.0001 for component B, and z =

2.6136 ± 0.0002 for component C, corresponding to a maximum velocity separation of Δv ≈ 58 ± 25 km s⁻¹ between the components. This is consistent with the redshifts for components A and B reported in Chen (2012).

### 3.1.2 GRB 150403A

An image taken of the field of GRB 150403A almost six months after the GRB with GROND (Greiner et al. 2008) showed extended emission at the position of the GRB. This is confirmed with the NIRSpec IFS observations, where line emission from Hα, Hβ, [O II]λλ3726,3729 and [O III]λλ4959,5007 is clearly detected in three regions of the data cube at a redshift consistent with the GRB afterglow (z = 2.06; Pugliese et al. 2015; see Fig. A2). We have labelled the three brightest emission components A, B and C on an image taken from the NIRSpec G140M/L100LP data, centred on the observer frame [O III]λ5007 emission line (Fig. 2). The GRB afterglow position (labelled ‘X’) appears to lie just to the west of component C, and not evidently on a star-forming region. However, the astrometry of these data is limited by the combined pointing accuracy of JWST (within 1 pixel) and the accuracy of the acquisition target position, which was ~ 0.′3. The estimated total 1σ uncertainty on the GRB afterglow position within the NIRSpec IFS field of view is indicated in Fig. 2 with the dashed white circle. Accurate astrometry was possible in the case of the host galaxy of GRB 050820A because the A and B components were detected in previous HST imaging data, allowing the GRB position to be located accurately. However, for the host galaxy of GRB 150403A, there is no imaging data available that resolves the components shown in Fig. 2, so that further refined astrometry is not possible.

Component B has the brightest emission lines, followed by components A and then C. The largest velocity separation is between components B and C, which are offset by Δv ≈ 88 km s⁻¹, whereas component A lies somewhere between the other two components.

## 3.2 Fixed slit observations

The remaining eight GRB host galaxies in the sample for which we had no evidence of extended emission were all observed with the NIRSpec S400A fixed slit (0.′4 slit width). In most cases this required observations in two grating/filter combinations with the exception of GRB 090323A, which at z = 3.57 (Chornock et al. 2009; Savaglio et al. 2012), had all relevant nebular emission lines redshifted into the wavelength range of the F170LP filter.

In four of the seven GRB host galaxy candidates that have been observed with the fixed slit<fnref n="6" /> (host galaxies of GRB030323, GRB080804, GRB090323 and GRB100219A), hydrogen Balmer and [O III]λλ4959,5007 emission was detected at observer wavelengths consistent with the corresponding GRB afterglow absorption redshift. Emission from [O II]λλ3726,3729 was also detected from the host galaxy of GRB080804 and GRB 090323, and tentatively from the host of GRB 030323. However, no [O II]λλ3726,3729 emission was detected in the host galaxy spectrum of GRB 100219A. In the case of the host galaxy of GRB 090323, emission from [N II]λλ6549,6584 and [S II]λλ6717,6731 was also detected as well as the galaxy continuum. This is indicative of a luminous, metal-rich galaxy, consistent with the high absorption-based metallicity (> 2 Z⊙).

<footnote n="6">⁶One remaining target is due to be observed between March and May 2024</footnote>
<table><caption>**Table 3.** Nebular line fluxes of intervening galaxy along line of sight to GRB 120815A at z = 1.539. All lines have been corrected for a Milky Way dust reddening of E(B − V)=0.10 (Schlafly & Finkbeiner 2011).</caption><thead><tr><th>Hβ</th><th>Hα</th><th>[O II]λλ3726,3729</th><th>[O III]λ4959<br>(10<sup>-17</sup> erg cm<sup>-2</sup> s<sup>-1</sup>)</th><th>[O III]λ5007</th><th>[N II]λ6584</th><th>[S II]λλ6717,6731</th></tr></thead><tbody><tr><td>0.23 ± 0.05</td><td>2.10 ± 0.06</td><td>...</td><td>0.17 ± 0.05</td><td>0.43 ± 0.05</td><td>1.02 ± 0.06</td><td>0.80 ± 0.06</td></tr></tbody></table>

<table><caption>**Table 4.** GRB host galaxy emission line properties. The host galaxies of GRB 120815A and GRB 121024A, listed separately at the bottom of the table, were not observed with NIRSpec, and instead line flux measurements were available from X-shooter observations in Krühler et al. (2015).</caption><thead><tr><th>GRB host</th><th>abs†</th><th>NOX22 R<sub>23</sub></th><th>12 + log (O/H)<br>NOX22 R<sub>3</sub></th><th>LMC23 R&#770;</th><th>DKS16</th><th>z<sub>em</sub></th><th>E(B-V)<sub>host</sub><br>(mag)</th><th>SFR<sub>‡</sub><br>M<sub>☉</sub>/yr</th><th>σ§;<br>(km/s)</th></tr></thead><tbody><tr><td>030323</td><td>7.48 ± 0.20<sup>a</sup></td><td>7.65 ± 0.30</td><td>7.65 ± 0.28</td><td>7.54 ± 0.21</td><td>...</td><td>3.3710</td><td>0.00<sup>+0.29</sup><sub>-0.00</sub></td><td>2.2 ± 1.8</td><td>80 ± 15</td></tr><tr><td>050820A</td><td>8.20 ± 0.10<sup>b</sup></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>galaxy-integrated</td><td></td><td>8.03*</td><td>7.97 ± 0.03</td><td>8.12*</td><td>...</td><td>2.6133</td><td>0.18 ± 0.05</td><td>36.0 ± 5.2</td><td>47 ± 1</td></tr><tr><td>component A</td><td></td><td>8.03*</td><td>8.02 ± 0.08</td><td>8.12*</td><td>...</td><td>2.6129</td><td>0.26 ± 0.06</td><td>15.3 ± 2.8</td><td>50 ± 2</td></tr><tr><td>component B</td><td></td><td>8.03*</td><td>7.94*</td><td>8.12*</td><td>...</td><td>2.6133</td><td>0.15 ± 0.08</td><td>11.5 ± 2.6</td><td>53 ± 2</td></tr><tr><td>component C</td><td></td><td>8.17 ± 0.14</td><td>8.16 ± 0.07</td><td>8.12*</td><td>...</td><td>2.6136</td><td>0.12 ± 0.14</td><td>2.8 ± 1.2</td><td>&lt;98</td></tr><tr><td>080804</td><td>8.33 ± 0.17<sup>c</sup></td><td>8.21 ± 0.18</td><td>8.12 ± 0.27</td><td>8.12 ± 0.14</td><td>...</td><td>2.2065</td><td>0.62 ± 0.39</td><td>4.3 ± 5.2</td><td>148 ± 23</td></tr><tr><td>090323</td><td>9.10 ± 0.11<sup>d</sup></td><td>8.45 ± 0.05</td><td>8.34 ± 0.03</td><td>8.43 ± 0.05</td><td>8.91 ± 0.07</td><td>3.5844</td><td>0.34 ± 0.06</td><td>78.0 ± 13.5</td><td>190 ± 5</td></tr><tr><td>100219A</td><td>7.53 ± 0.11<sup>e</sup></td><td>&lt;7.42</td><td>7.47 ± 0.11</td><td>&lt;7.40</td><td>...</td><td>4.6698</td><td>0.00<sup>+0.36</sup><sub>-0.00</sub></td><td>1.0 ± 1.1</td><td>66 ± 9</td></tr><tr><td>150403A</td><td>7.77 ± 0.05<sup>e</sup></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>galaxy-integrated</td><td></td><td>8.35 ± 0.11</td><td>8.26 ± 0.06</td><td>7.56 ± 0.10</td><td>...</td><td>2.0570</td><td>0.00<sup>+0.13</sup><sub>-0.00</sub></td><td>9.4 ± 3.4</td><td>55 ± 6</td></tr><tr><td>component A</td><td></td><td>8.50 ± 0.08</td><td>8.36 ± 0.06</td><td>7.56 ± 0.10</td><td>...</td><td>2.0570</td><td>0.00<sup>+0.16</sup><sub>-0.00</sub></td><td>2.8 ± 1.2</td><td>65 ± 9</td></tr><tr><td>component B</td><td></td><td>8.37 ± 0.14</td><td>8.31 ± 0.06</td><td>7.81 ± 0.17</td><td>...</td><td>2.0567</td><td>0.16 ± 0.17</td><td>6.1 ± 3.0</td><td>&lt;116</td></tr><tr><td>component C</td><td></td><td>8.10 ± 0.07</td><td>8.04 ± 0.10</td><td>8.12 ± 0.00</td><td>...</td><td>2.0576</td><td>0.51 ± 0.40</td><td>2.0 ± 2.4</td><td>&lt;116</td></tr><tr><td>120815A</td><td>7.46 ± 0.03<sup>e</sup></td><td>8.26 ± 0.23</td><td>8.13 ± 0.20</td><td>7.86 ± 0.50</td><td>...</td><td>2.3587</td><td>0.00<sup>+0.36</sup><sub>-0.00</sub></td><td>1.7 ± 1.8</td><td>28 ± 5</td></tr><tr><td>121024A</td><td>8.01 ± 0.07<sup>e</sup></td><td>8.38 ± 0.06</td><td>8.23 ± 0.04</td><td>7.68 ± 0.06</td><td>...</td><td>2.3012</td><td>0.00<sup>+0.09</sup><sub>-0.00</sub></td><td>37.3 ± 9.6</td><td>88 ± 4</td></tr></tbody></table>

† Absorption-based metallicity relative to solar and corrected for dust depletion. To convert to units of [M/H], more commonly used in GRB absorption line studies, need to subtract the solar metallicity value 12+log(O/H)=8.69 (Asplund et al. 2009).

‡ SFR derived from the Galactic and host galaxy dust extinction corrected Hα luminosity using the Kennicutt (1998) relation adopting a Chabrier (2003) IMF. The large uncertainties in some cases are dominated by the uncertainty on the dust correction.

§ Velocity width has been corrected for the intrinsic instrument resolution.

References: <sup>a</sup> Vreeswijk et al. (2004); <sup>b</sup> Thöne et al. (2008); <sup>c</sup> Cucchiara et al. (2015); <sup>d</sup> Wiseman et al. (2017); <sup>e</sup> Bolmer et al. (2019)

★ In these cases the measured line ratio in question is larger than the maximum value covered by the diagnostics (R<sub>23</sub> > 0.96, R<sub>3</sub> > 0.78, or R&#770; = 0.47R<sub>2</sub> + 0.88R<sub>3</sub> > 0.81 at 1σ), and the resulting best-fitting metallicity thus corresponds to the value at the turn over point between the lower and upper branch (see Fig. 5). The host galaxy of GRB 080804 and region C of the host galaxy of GRB 150403A also have a large value of R&#770;, but with an uncertainty that lies within the range of values considered in the LMC23 metallicity diagnostic.

In the case of two targets (GRB 120327A and GRB 120815A), the candidate host galaxies we observed were unfortunately found to be relatively dim foreground stars (Fig A7). These stars were not present in Gaia or other publicly available catalogues and the field is not covered by SDSS. The targeted sources could thus not previously be ruled out as the host galaxy. In the case of GRB 120815A, the offset between the identified host galaxy candidate and the GRB position was 1′′5, whereas in the case of GRB120327A the offset was 0′′3. However, in the latter case the observed source is three magnitudes brighter than expected, implying that the wrong source was targeted in the JWST NIRspec observations. No emission was detected in the NIRspec spectrum at the position of the candidate of the host galaxy of GRB 141109A.

The host galaxy candidate of GRB120327A was identified by D'Elia et al. (2014) at the position of the GRB afterglow with AB magnitude r' = 24.50 ± 0.23. However, the NIRspec spectrum of this source does not reveal any emission lines at the expected observer frame wavelength, and instead resembles a black body with a temperature ~3500 K, suggesting that the source is in fact a foreground star (see Fig. B1, left-hand panel).

In a late time observation of the field of GRB 120815A taken with the High Acuity Wide field K-band Imager (HAWK-I) a source is detected 1′′1 north-west of the GRB afterglow position, and this was

considered to be the host galaxy (9.2 kpc). However, the NIRspec data show the detection of two sources spatially offset by ~1′′2 (corresponding to 10 kpc), neither of which correspond to a galaxy at the redshift of GRB 120815A, at z = 2.358. The spectrum of the trace at the centre of the 2D spectrum resembles the Rayleigh-Jeans tail of a black body spectrum, implying that the targeted source is in fact a foreground star (see Fig. B1, right-hand panel). Precise astrometry was performed on the available imaging data of the GRB fields, and the lack of host galaxy detections in the case of GRB 120327A and GRB 120815A was therefore the result of the incorrect target being identified as the host galaxy in our pre-JWST imaging data, rather than due to an error in the positioning of the NIRspec fixed slit.

In the case of GRB 141109A an extended source was detected at the location of the GRB in r'-band GROND observations taken three months after the GRB, and also in 3.6µm observations taken with the Spitzer Space Telescope in March 2018 (program ID 13104; PI Perley), which we considered a to be a host galaxy candidate. The astrometry in our GROND images was typically good to within 0′′2, and we therefore accredit the lack of detected continuum or emission lines in our NIRspec fixed slit observations to the host galaxy being dimmer than expected, rather than the slit having missed the target.

The second trace detected in the 2D spectra taken for GRB 120815A shows a bright continuum with strong Balmer and
metal emission lines at observer wavelengths consistent with a galaxy at $z = 1.539$. This galaxy is therefore likely the emission counterpart to a strong intervening absorption line system that was detected in the GRB afterglow spectrum at the same redshift (Krühler et al. 2013). At $z = 1.539$ the $[O\text{II}]\lambda\lambda3726,3729$ line doublet lies blueward of the NIRSpec F100LP spectral range. However, $H\alpha$, $H\beta$ and $[O\text{III}]\lambda\lambda4959,5007$, as well as $[N\text{II}]\lambda\lambda6549,6584$ and $[S\text{II}]\lambda\lambda6717,6731$ are detected and are given in Table 3.

Emission lines from the host galaxy of GRB 120815A were previously detected with X-shooter (Krühler et al. 2015), and the lack of detection in our NIRSpec data is therefore due to a mistake in the target that we selected to observe rather than a lack of sensitivity. The $H\alpha$ and $H\beta$ emission lines in the X-shooter data (Krühler et al. 2015) were detected at only $3\sigma$, and $[O\text{II}]\lambda\lambda3726,3729$ was undetected. Nevertheless, the reported line fluxes are sufficient to be able to measure an emission line metallicity, albeit with large uncertainties (see Table 4).

## 3.3 Emission line flux measurements

Host galaxy emission lines in the 1D spectra were fit with Gaussian functions, with the velocity width of all lines in a given galaxy tied (corrected for the instrument resolution), and the position of the lines kept at a constant redshift (see Figs A1–A5). In the case of $[O\text{III}]\lambda\lambda4959,5007$ the line doublet was fixed to have a one-to-three line flux ratio (Osterbrock 1989). The model was generally a good fit to the data with the exception of the fits to the $[N\text{II}]\lambda\lambda6549,6584$ and $H\alpha$ lines from the host galaxy of GRB 090323 (see Fig. A6). The best-fitting Gaussian slightly under predicts the observed $H\alpha$ line flux amplitude, and the fit to $[N\text{II}]\lambda6584$ is too narrow. Furthermore, the best-fitting $[N\text{II}]\lambda\lambda6549,6584$ doublet line ratio is $[N\text{II}]\lambda6584/[N\text{II}]\lambda6549=1.6$, which is far smaller than the expected line ratio of 3 (Storey & Zeippen 2000). Forcing the line ratio to be 3 results in the fit to $[N\text{II}]\lambda6549$ significantly underestimating the observed emission of this line. The afterglow of GRB 090323 had strong absorption from two systems separated by just $\Delta v \approx 660$ km s$^{-1}$, which are proposed to be the signature of two interacting galaxies (Savaglio et al. 2012). It is therefore possible that our NIRSpec spectrum contains the combined emission from two galaxies, which may explain why our single Gaussian fits cannot fully describe the data. Although no spatial offset is evident around the $H\alpha$ and $[N\text{II}]\lambda\lambda6549,6584$ lines in the 2D spectrum (Fig. A5, left), we tried fitting the lines with a two-component model. The fit to the $H\alpha$ line was marginally improved when using a two components model (Fig. A5, right), but the fit to $[N\text{II}]\lambda6584$ still appears too narrow. The Akaike and Bayesian information criterion increases by 10–15 when applying a two component fit, suggesting that the additional component does not significantly improve the fit, and thus for the rest of our analysis we use the flux measurements from the single Gaussian. The line fluxes from our single component fits are reported in Table 2.

Measured line fluxes for all host galaxies were corrected for Milky Way dust extinction along the GRB line of sight using the Schlafly & Finkbeiner (2011) E(B – V) reddening maps (values given in Table 1) and assuming a Cardelli, Clayton & Mathis (1989) dust extinction curve with an average total-to-selective dust extinction value $R_V = 3.08$. The dust reddening from the GRB host galaxy was calculated from the $H\alpha/H\beta$ Balmer decrement assuming an intrinsic ratio $H\alpha/H\beta = 2.86$ (Osterbrock 1989), which is appropriate for star-forming regions with temperature $\sim 10^4$ K and electron densities $n_e = 10–100$ cm$^{-3}$. We corrected the line fluxes for host galaxy dust extinction using the average extinction law from the Small

Magellanic Clouds (SMC) Pei (1992), which has a total-to-selective extinction $R_V = 2.96$. We note that the majority of the host galaxies in the sample have uncertain host galaxy dust reddening such that only the host galaxy of GRB 090323 has a reddening measured at $>2\sigma$ confidence ($E(B – V) = 0.34 \pm 0.06$). In Section 4.2 we investigate the effect of these uncertain dust reddening corrections on our results.

The Milky Way dust-corrected fluxes for all lines detected at a SNR$>2$ are reported in Table 2, and the fits to the lines are shown in the appendix (Figs A1–A5). In Table 4, we give the measured host galaxy dust reddening and the SFR based on the Galactic and host galaxy dust-corrected $H\alpha$ luminosity using the Kennicutt (1998) relation adopting a Chabrier (2003) IMF, which reduces the predicted SFR by a factor of $\sim 1.6$ compared to a Salpeter IMF (Salpeter 1955). The errors on the SFR include the uncertainty on the dust reddening correction. In Table 4 we also provide the line velocity widths (corrected for the intrinsic instrument resolution) and the absorption and emission line metallicities based on several diagnostics (described in Section 4.1).

For the host galaxies of GRB 080804 and GRB 090323, lower signal to noise emission line flux measurements were already reported by Krühler et al. (2015) from X-shooter data, most of which are consistent at $1\sigma$ with our NIRSpec measurements. The lack of any $H\beta$ detection from the host galaxy of GRB 090323 in Krühler et al. (2015; $<1.5 \times 10^{-17}$ erg cm$^{-2}$ s$^{-1}$ at $3\sigma$) is only marginally consistent ($3\sigma$) with the strong emission line that we measure in the NIRSpec spectra, in contrast to the very good agreement in the $[O\text{II}]\lambda\lambda3726,3729$ line flux. It is therefore possible that the uncertainties in the X-shooter $H\beta$ measurement for the host of GRB 090323 are underestimated.

## 3.4 Absorption line metallicities

The GRB absorption line metallicities used in this paper were taken from the literature, and they are given in Table 4 together with references. Three of the GRBs in the sample were observed with low resolution spectrographs ($R \sim 1000–2000$); either the Focal Reducer and low dispersion Spectrograph 2 (FORS2) mounted on the 8 m Very Large Telescope (VLT) (GRB 030323 and GRB 090323 Vreeswijk et al. 2004; Savaglio et al. 2012), or the Low Resolution Imaging Spectrometer (LRIS) mounted on the Keck I 10 m telescope (GRB 050505). Two GRBs were observed with high resolution echelle spectrographs ($R \sim 30\,000–50\,000$); GRB 080804 with the VLT/Ultraviolet and Visual Echelle Spectrograph (UVES; Thöne et al. 2008; Fynbo et al. 2009), and GRB 050820A with UVES as well as the Keck/Higher Resolution Echelle Spectrometer (HiRES; Prochaska et al. 2007a). The remaining GRBs in the sample were observed with the medium resolution VLT/X-Shooter ($R \sim 6000–10\,000$; Selsing et al. 2019).

In all cases broad Ly-$\alpha$ absorption was detected in the afterglow spectra, corresponding to absorption from neutral hydrogen. Narrow metal absorption lines from species such as Zn, Si, S and Mg are also common (e.g. Fynbo et al. 2009). Assuming solar relative abundances, it is then possible to obtain a largely model-independent measure of the neutral gas metallicity by combining the measured hydrogen absorption column density with metal column densities using unsaturated absorption lines, ideally from non-refractory metals. At the large column densities of neutral material in DLAs, hydrogen self-shielding make ionization corrections negligible, and thus the greatest uncertainty in such a technique is the corrections for depleted metals that are in the dust phase, as well as the assumption of solar relative abundances, which we discuss further in Section 4.2.
<figure><img src="image_4.png" /><figcaption>**Figure 3.** The NOX22 $R_{23}$ (left) and NOX22 $R_3$ (right) emission line metallicities against absorption line metallicities for our sample of GRB host galaxies and a compilation of QSO-DLAs and emission counterparts taken from Rahmani et al. (2016). The emission line metallicities are in units of [M/H] = log(O/H) − log(O/H)⊙. For the host galaxies of GRB050820A and GRB150403A, metallicities for the resolved component closest to the projected GRB afterglow position (components C in both cases; see Figs 1 and 2) are plotted as an open pentagon and diamond symbol, respectively. For GRB 030323 and GRB 090323 the absorption metallicity is considered a lower limit because they were measured with low resolution spectra, and this is represented in the figures with right-pointing arrows. GRB 090323 is plotted with a star symbol. The host galaxy of GRB 100219A had no [O II]λλ3726,3729 detection and the $R_{23}$ emission line metallicity is therefore shown as an upper limit. The QSO-DLA data points are colour-coded by the impact parameter. The dashed line indicates where the absorption and emission line metallicities are equal, and the dotted lines represent the emission line metallicity offset from the absorption metallicity by the amount shown on the label. The number of QSO-DLA and GRB data points in each panel varies due to the need for different line ratios in each metallicity diagnostic.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>**Figure 4.** Same as Fig. 3 but now with the emission line metallicity derived from the LMC23 $\hat{R}$ diagnostic. We additionally show the DKS16 $N_2S_2H\alpha$ emission line metallicity for GRB 090323 (green star) and for two QSO-DLAs (green triangles), which are the only GRB host galaxy and QSO-DLA emission counterparts in the sample with detected [N II]λ6584 and [S II]λλ6717,6731 emission lines necessary for this diagnostic.</figcaption></figure>

For seven GRBs in the sample the dust-depletion corrected metallicities were determined following the method described in De Cia et al. (2013), where the abundances of numerous singly ionized metals are fitted simultaneously with a dust depletion model in order to measure a consistent, dust depletion-corrected metallicity (Wiseman et al. 2017; Bolmer et al. 2019). For the remaining three GRBs, a single, non-refractory element was used to determine the metallicity; either sulphur (GRB 030323 and GRB 050505), or zinc (GRB 080804) (Cucchiara et al. 2015). In these cases, dust depletion corrections were applied following the method of De Cia et al. (2018), where the [S/Fe] or [Zn/Fe] relative abundance can be

used to determine the level of dust depletion, giving results that are consistent to when multi abundances are fit (e.g. Heintz et al. 2023a). The Fe II column density along the line of sight to GRB 080804 is only constrained to lie within the range log N<sub>Fe</sub>/cm<sup>2</sup> = 14.66–15.14 (C. Ledoux, private communication), which corresponds to a dust depletion correction δz<sub>h</sub> between −0.26 and −0.39. We therefore use the mid-range dust depletion corrected metallicity and propagate through the uncertainty of 0.07 dex on the dust depletion correction to our absorption metallicity accordingly. In the case of GRB 030323 and GRB 050505, where only low resolution spectra were available, the published absorption metallicities should be considered lower limits. We nevertheless give the published metallicities in Table 4, but will discuss the corresponding uncertainty on the absorption metallicity in Section 4.2. Although the optical afterglow spectrum of GRB 090323 was also low resolution, we consider the measured metallicity more robust due to the numerous metal abundances (Zn, S, Si, Cr, Fe) that were used to measure the dust depletion and metallicity, which reduce the effect of saturation in any single line (Wiseman et al. 2017). The uncertainties on the absorption metallicity given in Table 4 correspond to the statistical uncertainty on the metal and H I column densities, and do not include systematic uncertainties, such as from the dust depletion correction.

# 4 RESULTS

## 4.1 Emission line metallicities

No emission was detected from the temperature-sensitive [O III]λ4363 line in any of the GRB host galaxies in our sample. For the majority of the sample, the 3σ upper limit on the [O III]λ4363/[O III]λλ4959,5007 line flux ratio is <0.05, corresponding to a limit on the temperature of T<sub>e</sub>(O iii) < 35,000 K. More stringent constraints on the average electron temperature of our GRB host galaxy sample can be placed from a stacked
spectrum, resulting in a $3\sigma$ upper limit on the [O III]λ4363 line flux of $1.3 \times 10^{-18}$ erg cm$^{-2}$ s, and an auroral-to-nebular line flux ratio of <0.04, corresponding to a limit on the temperature of $T_e(O iii) \lesssim 27,000$ K. The electron temperatures measured in other $z = 2-3$ galaxies is generally lower than this upper limit that we obtain (e.g Christensen et al. 2012; Patrício et al. 2018; Laseter et al. 2023; Sanders et al. 2024; Strom et al. 2023), and we therefore need to rely on strong emission line diagnostics to obtain gas-phase metallicities for our sample of galaxies.

The majority of strong emission line metallicity diagnostics are calibrated to galaxies and H II regions within the local Universe (Kewley & Dopita 2002; Kobulnicky & Kewley 2004; Pettini & Pagel 2004; Maiolino et al. 2008; Andrews & Martini 2013; Dopita et al. 2016; Pilyugin & Grebel 2016; Curti et al. 2017), whereas high-z galaxies have higher radiation fields and/or ionization parameters (e.g. Kewley et al. 2013; Steidel et al. 2014). Attempts have been made to calibrate strong emission line diagnostics to the conditions present in distant galaxies, either by using local analogues to high-z galaxies (e.g. Bian, Kewley & Dopita 2018; Nakajima et al. 2022), or by using recent, small samples of high-z galaxy spectra with metallicities measured from the temperature-sensitive [O III]λ4363 line detected with JWST (e.g. Hirschmann, Charlot & Somerville 2023; Sanders et al. 2024).

The emission line diagnostics that are available for our GRB host galaxy sample are generally limited to those that use hydrogen and oxygen lines, since we do not detect emission from [N II]λλ6549,6584 or the [S II]λλ6717,6731 doublet in the majority of our sample. The most common of such line ratios used to trace metallicity are $R_2$ ([O II]λλ3726,3729/Hβ), $R_3$ ([O III]λ5007/Hβ) (also referred to as O$_3$), O$_32$ ([O III]λ5007/[O II]λλ3726,3729) and $R_{23}$ ([O II]λλ3726,3729 + [O III]λλ4959,5007)/Hβ). Given that our galaxy sample is at $z > 2$, we only considered diagnostics that have been calibrated to the conditions present in the high-z Universe, either using high redshift galaxy samples, or local analogues. We chose to use the Laseter et al. (2023) (LMC23 from hereon) so-called $\hat{R}$ diagnostic, which is based on a combination of $R_2$ and $R_3$, and the metallicity diagnostics calibrated by Nakajima et al. (2022) (NOX22 from hereon) and Sanders et al. (2024) (SST23 from hereon). NOX22 and SST23 provide diagnostics that include the hydrogen and oxygen line ratios listed above, but NOX22 additionally includes N$_2$ and O$_3$N$_2$ diagnostics. The LMC23 and SST23 diagnostics are calibrated against samples of high-z galaxies ($2 < z < 9$) that have $T_e$-based metallicities, whereas NOX22 used a combination of local SDSS galaxies and extremely metal-poor galaxies to extend the metallicity range down to far lower metallicities ($>1$ dex) than is covered in standard calibration samples (e.g. Curti et al. 2017), making their diagnostics more appropriate for high-z galaxies. We note that the $R_{23}$ and $R_3$ from Maiolino et al. (2008) and NOX22 are very similar (SST23; see their fig. 6), and Patrício et al. (2018) found that the Maiolino et al. (2008) line diagnostics provided the best agreement (within 0.1 dex) to their measured $T_e$-based metallicities for a sample of 16 galaxies at $z = 1.4-3.6$. This gives some support to the applicability of the NOX22 diagnostics to high-z galaxies.

The NOX22 sample has a large scatter (up to an order of magnitude) in metallicity for a given $R_3$ or O$_32$ line ratio at the low metallicity end ($12 + \log(O/H) \lesssim 8$). They find this scatter to be dependent on the Hβ equivalent width, EW(Hβ), whereby galaxies with higher average EW(Hβ) have a lower $R_2$ but a higher O$_32$ at a fixed metallicity. We only detect the galaxy continuum in

the host galaxy of GRB 090323, for which we measure a rest-frame EW(Hβ)=44 ± 4Å, placing it in the NOX22 low EW(Hβ) bin. For the rest of the sample we can only place lower limits on the equivalent width, the most constraining being EW(Hβ)>50Å for the host galaxy of GRB 030323. We therefore cannot determine which NOX22 EW(Hβ) bin the majority of our sample should lie in (low: <100Å, intermediate: 100–200Å, or high: >200Å). For this reason we do not consider the NOX22 $R_2$ and O$_32$ diagnostics in our analysis, considering only the NOX22 $R_{23}$ and $R_3$ diagnostics. Although these two latter diagnostics also show an EW(Hβ) dependence, but it is much weaker than for $R_2$ and O$_32$ (~0.5 dex in metallicity at a fixed line ratio). To compute the NOX22 $R_{23}$ and $R_3$, we initially use the high EW(Hβ) calibrations, which NOX22 argue are most appropriate for high-z galaxies, but in cases where we measure $12 + \log(O/H)>8$, we use the EW-averaged value, which are valid up to $12 + \log(O/H)=8.9$. For those diagnostics that are double branched, such as the NOX22 $R_2$ and $R_{23}$, and the LMC23 $\hat{R}$ diagnostic, we use the absorption line metallicity to select between the two solutions.

The SST23 diagnostics generally show a weaker dependence between metallicity and the relevant line ratios, than the NOX22 diagnostics for example (see Fig. 5), and the SST23 metallicities thus cover a smaller dynamical range. We therefore move results based on the ST23 diagnostics to the appendix.

In the case of the host galaxy of GRB 090323, the [S II]λλ6717,6731 and [N II]λλ6549,6584 line doublets were detected and thus the Dopita et al. (2016) (DKS16 from hereon) N$_2$S$_2$Hα diagnostic could be used, which has the advantage that it is independent of dust reddening, relatively independent of the ionization parameter, and the authors claim it can be used over the full abundance range encountered at high-z. The N$_2$S$_2$Hα best-fitting metallicity is $12 + \log(O/H) = 8.89 \pm 0.08$, corresponding to $\log(Z/Z_\odot) = 0.20 \pm 0.08$, which is within $2\sigma$ of the measured absorption line metallicity ($0.41 \pm 0.11$; Wiseman et al. 2017).

In Table 4, we list the computed NOX22 $R_{23}$ and $R_3$, the LMC23 $\hat{R}$, and the DKS16 N$_2$S$_2$Hα metallicities. In this table we also provide the afterglow absorption metallicities and redshifts, and the emission line redshift and velocity dispersion corrected for the instrument resolution. The SST23 $R_{23}$, $R_3$, $R_2$ and O$_32$ metallicities are given in Table D1.

## 4.2 Nebular versus neutral gas-phase metallicity

In Fig. 3, we plot the absorption line metallicity against the NOX22 $R_{23}$ (left) and NOX22 $R_3$ (right) emission line metallicities for our GRB host galaxy sample (red) and for a compilation of QSO-DLAs (shades of blue) from Rahmani et al. (2016) with absorption and emission line metallicities of the intervening galaxy counterpart. The sample of QSO-DLAs are generally at $z < 0.7$, but three lie at $z > 2$ (blue circle data points from Bouché et al. 2013; Fynbo et al. 2013; Krogager et al. 2013) consistent with our GRB host galaxy sample (see Table C1 for details on the QSO sample). In our GRB host galaxy sample we also include the hosts of GRB 120815A and GRB 121024A, which have absorption and emission lines detected from ground-based observations (Krühler et al. 2013; Friis et al. 2015). In Fig. 4, we show the absorption against the LMC23 $\hat{R}$ emission metallicity, as well as against the DKS16 N$_2$S$_2$Hα emission line metallicity for the host galaxy of GRB 090323 (green open star) and two QSO-DLAs (green open triangles; J0441-4313 at $z = 0.1010$ and J1544+5912 at $z = 0.0102$), all of which have the necessary [N II]λ6584 and [S II]λλ6717,6731 emission line detections to compute the N$_2$S$_2$Hα metallicity. In both Figs 3 and 4, the
<figure><img src="image_6.png" /><figcaption>**Figure 5.** GRB host galaxy and QSO-DLA galaxy counterpart absorption line metallicity against the logarithmic line ratios $R_{23}$ (top left), $R_3$ (top right), $O_{32}$ (middle left), $R_2$ (middle right), the LMC23 combined $R_2$ and $R_3$ line ratio diagnostic ($\hat{R}$) (bottom left) and the Dopita et al. (2016; DKS16) $N_2S_2H\alpha$ diagnostic (bottom right). All data points are the same as in Figs 3 and 4. The best-fitting curves from Bian, Kewley & Dopita (2018; BKD18; green dot-dashed), SST23 (solid magenta), and the NOX22 Hβ EW-averaged (yellow solid) and high Hβ EW (yellow dotted) relations are overplotted in the top four panels for reference. Note that Bian, Kewley & Dopita (2018) did not provide an $R_2$ diagnostic.</figcaption></figure>
emission and absorption metallicities are in units of [M/H], assuming a solar metallicity value $12 + \log(O/H) = 8.69$ (Asplund, Amarsi & Grevesse 2021).⁷ The QSO-DLA data points are colour-coded by their impact parameter, ranging from 1 to 50 kpc, although the association with the emission counterparts at large impact parameters is less secure. The offset from the galaxy centre of our sample of GRB sightlines is generally unknown, but when measured, they are typically small (e.g. average offset of 1 kpc in sample of 68 GRB host galaxies observed with HST; Blanchard, Berger & Fong 2016). All GRB data points in Figs 3 and 4 are therefore plotted with the same red colour. The sample of plotted QSO-DLA data points is smaller than the sample in Rahmani et al. (2016) because we did not consider limits, and we have the additional requirement that $H\beta$ and either $[O\text{II}]\lambda\lambda3726,3729$ or $[O\text{III}]\lambda\lambda4959,5007$ have to be detected in order to apply the emission line diagnostics that we consider in this work.

For the two galaxies observed with the IFS (for GRB 050820A and GRB 150403A) we plot the emission line metallicity of the resolved component closest in projection to the GRB afterglow, which in both cases is component C in Figs 1 and 2. In the case of GRB 050820A the $R_{23}$, $R_3$, and $\dot{R}$ line ratios of all components are larger than the maximum value covered by the NOX22 and LMC23 diagnostics, and the computed emission line metallicity in all cases is thus the maximum value possible with these diagnostics. The resolved components considered in the host galaxy of GRB 150403A, on the other hand, do vary in metallicity by up to 0.3 dex within the same diagnostic. The absorption line metallicity is most consistent with the emission line metallicity of component C in the case of NOX22 $R_{23}$ and $R_3$, but it is most consistent with the $\dot{R}$ metallicity of component B. A more detailed analysis on the resolved spectroscopic properties of these two GRB host galaxies will be presented in a follow-up paper (Topçu et al., in preparation). In Fig. D1, we show the results for the four SST23 diagnostics.

The well-known discrepancy between emission line metallicities (e.g. Kewley & Ellison 2008; Andrews & Martini 2013) is evident in Figs 3 and 4, with NOX22 and LMC23 giving notably different results. In the former case, the NOX22 metallicities are larger than the absorption metallicities by ~0.2 dex on average (Fig. 3), although this offset is predominantly at $[M/H]_{abs} < -0.5$, where there appears to be a relatively weak relation between the absorption and emission metallicity. The standard deviation in the NOX22 emission line metallicities relative to the line of equality (dashed black line) is 0.4–0.5 dex. Applying a Spearman’s rank test returns a rank coefficient $\rho = 0.2–0.3$ with p-value of ~0.2, indicating a weak and non-significant correlation. The LMC23 metallicities, on the other hand, are more evenly distributed on both sides of the line of equality (Fig. 4), with LMC23 generally lying within ±0.2 dex of the absorption metallicities. In this case the Spearman’s rank coefficient is $\rho = 0.8$ with p-value $= 2 \times 10^{-5}$, demonstrating that there is a strong and significant positive correlation. The DKS16 $N_2S_2H\alpha$ metallicity is also within ±0.2 dex of the absorption metallicity for the three cases where this diagnostic could be applied (Fig. 4, green data points). Of note is the good agreement between the absorption and the DKS16 metallicity for the host galaxy of GRB 090323 (consistent within $2\sigma$), which for NOX22 and LMC23 differed by a factor of four.

Given the large uncertainty on the host galaxy dust reddening corrections, we repeated the analysis in which we only applied a

host galaxy dust correction if dust reddening was detected at more than $3\sigma$ significance. This only applies to the two most metal-rich absorbers in our sample; the host galaxy of GRB 090323 and the emission counterpart of QSO-DLA J0441-4313. We found that the results were only marginally affected, with the points having similar offsets and standard deviations as shown in Figs 3 and 4.

Systematic uncertainties also exist in the absorption line metallicities, primarily from the possible saturation of metal absorption lines in low- and even mid-resolution spectra, and also in the dust depletion corrections. All QSO-DLA absorption line metallicities shown in Figs 3 and 4 are measured from mid- or high-resolution spectra, and systematic effects should therefore be less of a problem (Wiseman et al. 2017). However, the absorption metallicities for GRB 030323 and GRB 090323 are measured from low resolution data, and these metallicities should therefore be considered as lower limits (Prochaska, Chen & Bloom 2006). We have accordingly plotted these data points with right-pointing arrows, although, as described in Section 3.4, we consider the absorption metallicity for GRB 090323 more robust due to the multiple metal lines used to constrain the dust depletion and metallicity.

Dust depletion corrections can be well constrained when multiple metals are used (e.g De Cia et al. 2013, 2016; Wiseman et al. 2017), although De Cia et al. (2018) also found that corrections based on just the [Zn/Fe] and [S/Fe] relative abundance can give very similar results. An additional advantage of using multiple lines to measure the absorption line metallicity is that the method is also sensitive to $\alpha$-element enhancements, whereby enhanced elements will have relative abundances that lie above the best-fitting dust depletion curve provided there are enough Fe-group elements to constrain the depletion curve. Of those GRBs in our sample with absorption metallicities measured in this way (i.e. from Wiseman et al. 2017; Bolmer et al. 2019), only GRB 121024A shows a tentative Si overabundance of ~0.5 dex although no corresponding enhancement is observed in other $\alpha$-elements, such as O or S (Bolmer et al. 2019). The Si abundance therefore appears as an outlier in the fit and does not contribute to the best-fitting absorption metallicity. The absorption metallicity for the host galaxies of a further two GRBs was determined from the [S/H] abundance, which if they have an $\alpha$-element enhancement, may overestimate the metallicity by ~0.2–0.3 dex (Becker et al. 2012; De Cia et al. 2016, 2024), further increasing the apparent discrepancy between absorption and emission line metallicities. The QSO-DLA absorption metallicities are similarly measured using a range of metals, three of which relied on alpha-element abundances (S or Si), although they all had measured metallicities $[M/H] > -0.5$, where the agreement between the NOX22 and absorption metallicities is relatively good. Any uncertainties in $\alpha$-element enhancements are therefore likely to bring absorption and emission line metallicities further apart, and although dust depletion corrections introduce some uncertainty to the absorption-based metallicities, these are unable to explain the extent of the disparity with the NOX22 metallicities at the low metallicity end.

We do not see any clear dependence in Figs 3 and 4 on the emission and absorption metallicity offset of the QSO-DLA data points with impact parameter (i.e. colour of data point), as would be expected if QSO-DLAs with large impact parameters probe correspondingly less enriched material. The QSO-DLA with greatest difference between the emission and absorption line metallicity is QSO-DLA J0958+0549, which has an impact parameter of 20 kpc (Rahmani et al. 2016), whereas the QSO-DLA with the largest impact parameter of 50 kpc (J1436-0051) has an emission line metallicity that is within 0.2 dex of the absorption line metallicity in Figs 3

<footnote>$^7[\text{M/H}] = \log(\text{O/H}) - \log(\text{O/H})_\odot$, assuming that the relative abundance of oxygen is solar.</footnote>
and 4. This is consistent with the relatively shallow (but negative) metallicity gradient reported in the literature out to 20–40 kpc (e.g. Chen, Kennicutt & Rauch 2005; Péroux et al. 2013; Christensen et al. 2014; Rahmani et al. 2016; Rhodin et al. 2018).

The agreement between the absorption and the LMC23 emission line metallicities (and also the DKS16 metallicities) for the GRB and QSO-DLA sample is quite remarkable given that absorption and emission lines probe different phases of the gas, and the measured metallicities are averaged over different regions of the galaxy; either luminosity-weighted over the whole galaxy in emission, or density- weighted along a single sightline through the galaxy in absorption. The standard deviation of the full GRB and QSO-DLA sample is 0.24 dex, which is comparable (if not slightly better) to the scatter that has been observed between $T_e$-based and strong line metallicities in recent high-$z$ galaxy samples observed with JWST (Laseter et al. 2023; Sanders et al. 2024). The NOX22 metallicities, on the other hand, are systematically larger than the absorption metallicities, even though there may be some weak relation with the absorption line metallicity (Fig. 3). However, the uncertainties on what is the most appropriate emission line diagnostic to use clearly dominates over any statistical uncertainty, and limits the conclusions that can be reached on the relation between the metallicity of the neutral gas ISM probed in absorption and that of ionized star-forming regions probed in emission, or on the effect of single sightline versus galaxy-integrated measurements.

## 4.3 GRB host stellar masses and implied metallicities

Several GRB host galaxies in our sample have stellar masses reported in the literature, which we use to investigate where our GRB host galaxy sample lies on the mass-metallicity relation (MZR). The host galaxies with mass estimates or limits are GRB 030323 (log $M_*/M_\odot$ < 9.23; Laskar, Berger & Chary 2011), GRB 050820A (log $M_*/M_\odot$ = 9.29; Chen et al. 2009), GRB 080804 (log $M_*/M_\odot$ = 9.28; Perley et al. 2016), GRB 090323 (log $M_*/M_\odot$ = 10.2; Krühler & Schady 2017), and GRB 121024A (log $M_*/M_\odot$ = 9.9; Friis et al. 2015). Although the stellar masses are taken from several different references, the majority are determined from fits to the optical through to NIR galaxy spectral energy distribution (SED), and are thus relatively insensitive to assumptions made on the SFR history and dust attenuation prescriptions (e.g. Palmerio et al. 2019). The exception is in the case of the host galaxy of GRB 080804, where the stellar mass is based on a single mid-infrared data point, which can over-estimate $M_*$ by ~0.4 dex compared to stellar masses from SED fitting. This stellar mass can therefore be considered an upper limit.

Using the best-fitting relation of Maiolino et al. (2008) and Mannucci et al. (2009) for galaxies at $z \sim 2.2$ and $z = 3-4$, respectively, we estimate the expected (emission line) metallicity given the host galaxy stellar mass. The emission line metallicity diagnostics used in these papers combined a number of line ratios, but the authors state that the results are dominated by the $R_{23}$ or $R_3$ diagnostic (Maiolino et al. 2008), which is thus comparable to our analysis. More recently Sanders et al. (2021) measured the MZR for a sample of galaxies at $z \sim 2.3$ and $z \sim 3.3$ from the MOSDEF survey (Kriek et al. 2015). However, in their analysis they used the Bian, Kewley & Dopita (2018) metallicity diagnostics, which can differ significantly from the NOX22 calibrations that we used (see e.g. $R_3$ and $O_{32}$ panels in Fig. 5), which will cause there to be a systematic difference in the derived metallicities.

For the five host galaxies in our sample with stellar mass estimates, the Maiolino et al. (2008) and Mannucci et al. (2009) MZRs predict metallicities that are on average within ~0.2 dex of the NOX22

and LMC23 metallicities computed in Section 4.1. The largest discrepancy is in the $z = 3-4$ MZR, and if we only consider those host galaxies at $z = 2-3$, the predicted and measured metallicities are consistent within 0.01 dex for the $\hat{R}$ LMC23 metallicities, and within 0.1 dex for the NOX22 diagnostics. GRB host galaxies have also been found to agree well with the fundamental metallicity relation (FMR; Mannucci, Salvaterra & Campisi 2011; Palmerio et al. 2019), which adds a SFR-dependency to the MZR (FMR; Mannucci et al. 2010). To check this with our sample of GRB hosts with $M_*$ estimates, we use our $H\alpha$-based SFRs to determine the metallicity predicted by the FMR, but we find that this increases the disagreement between the expected and measured emission line metallicities, with the FMR predicting metallicities that are on average ~0.4 dex larger than we measure using strong emission line diagnostics. A larger sample of host galaxies and a more consistent approach in measuring $M_*$ is required to investigate further where GRB host galaxies lie in high-$z$ MZR and FMR relations.

## 4.4 Emission line ratios

Given that absorption line metallicities are less model-dependent compared to emission line metallicities, we investigate the relation between common emission line ratios and the GRB afterglow absorption metallicity. In Fig. 5, we plot the absorption line metallicity for our GRB host galaxy (red) and QSO-DLA (blue) sample (using the $12 + \log(O/H)$ scale) against the logarithm of the $R_3$, $R_{23}$, $O_{32}$ and $R_2$ line ratios in the top two panels, and against the LMC23 $\hat{R}$ (left) and the DKS16 $N_2S_2H\alpha$ line ratios in the bottom two panels. For reference, we also show the best-fitting metallicity diagnostics from a number of papers, indicated in the top left figure legend. We show the NOX22 metallicity diagnostics calibrated across the full metallicity range of their sample (yellow solid), as well as the relations for their sample of high $H\beta$ EW galaxies (yellow dotted), which are valid for $12 + \log(O/H) < 8.0$. The Bian, Kewley & Dopita (2018) (BKD18; green dot-dashed) and SST23 (solid magenta) relations are generally shifted upwards relative to the NOX22 curves, and the greatest differences are in the $O_{32}$ diagnostics, where the SST23 and Bian, Kewley & Dopita (2018) relations do not turn over at low metallicities. Note that Bian, Kewley & Dopita (2018) did not provide an $R_2$ diagnostic calibration.

The data are in general good agreement with the models for the $R_{23}$ and $R_3$ diagnostics, especially the GRB data points. However, greater offsets are present in the $O_{32}$ and $R_2$ panels, where the curves predict metallicities that are typically larger than the absorption metallicity for a given $O_{32}$ or $R_2$ line ratio. Much of the good agreement in the top two panels of Fig. 5 could in part be due to the GRB and QSO-DLA data points lying on the fairly flat portion of the $R_{23}$ and $R_3$ diagnostics, where the empirical relations between the line ratios and metallicity is fairly weak. As such, an increase in metallicity of 0.3–0.5 dex would shift the GRB data points closer to the $O_{32}$ and $R_2$ diagnostics while still maintaining a relatively good agreement with the $R_{23}$ and $R_3$ diagnostics.

There is better agreement between the data points and the LMC23 best-fitting relation (Fig. 5 bottom left panel; black solid curve) than seen for the $R_{23}$, $R_3$, $R_2$ and $O_{32}$ diagnostics, as expected given the general agreement between the absorption metallicity and LMC23 emission metallicity shown in Fig. 4. Although, as was the case for the $R_{23}$ and $R_3$ line ratios, the majority of the data points lie close to the LMC23 diagnostic turn over point. A greater sample of data points with low ($12 + \log(O/H) < 7.7$) and high ($12 + \log(O/H) > 8.5$) absorption line metallicities are therefore required to determine
how closely the absorption metallicities and galaxy emission line ratios trace each other.

A clear outlier in the top two rows of Fig. 5 and in the $\hat{R}$ line ratio is the super-solar metallicity data point corresponding to the afterglow of GRB 090323. However, as seen in the bottom right panel, the combined $N_2S_2H\alpha$ line ratio of this host galaxy is as expected if the absorption metallicity is representative of the nebular gas-phase metallicity. There are two QSO-DLAs with absorption line metallicities that also have detected [N II]$\lambda\lambda6549,6584$ and [S II]$\lambda\lambda6717,6731$ emission lines, which are shown in this figure, and their $N_2S_2H\alpha$ line ratios are also as expected given their absorption line metallicities. This diagnostic has the additional advantage that it is not double branched. Nevertheless, an important potential limitation of the diagnostic is that it assumes a fixed O/H–N/O relation based on observations in the local Universe that may not be applicable at high-z (e.g. Fosbury et al. 2003; Christensen et al. 2012; Bunker et al. 2023; Cameron et al. 2023; Marques-Chaves et al. 2024). We discuss this diagnostic, and specifically the host galaxy of GRB 090323, in greater detail in Section 5.2.

# 5 DISCUSSION

## 5.1 Emission line diagnostics

We find remarkable agreement between our sample of GRB and QSO-DLA absorption line metallicities and the LMC23 metallicity diagnostic, with a scatter that is comparable to that seen in high-z calibration samples (Laseter et al. 2023; Sanders et al. 2024). This agreement has two important implications for the use of absorption and emission line probes to study the cosmic chemical enrichment. First, it presents the possibility of combining absorption and emission line probes to study the cosmic chemical evolution out to higher redshifts and down to lower mass galaxies than is possible with emission line metallicities alone, even with JWST. Current JWST mass-metallicity samples at $z > 4$ extend down to $M_* \sim 10^7 M_\odot$ and $12 + \log (\text{O/H}) \sim 7.5$ (Nakajima et al. 2023; Curti et al. 2023a), whereas absorption line metallicities go down to equivalent oxygen abundances $12 + \log (\text{O/H}) < 7$ (e.g. Bolmer et al. 2019; Heintz et al. 2023a), corresponding to $M_* \sim 10^5 M_\odot$ when extrapolating the best-fitting $z = 4-10$ MZR from Nakajima et al. (2023). Secondly, it suggests that star-forming regions and the interstellar neutral gas have a very similar chemical composition, implying that the multiphase ISM is well mixed within the galaxy. Furthermore, the similar scatter in the GRB and the QSO-DLA samples implies that the neutral gas is chemically homogeneous out to large distances from the galaxy centre. This would require enriched material within star-forming regions to be efficiently distributed through outflows into the CGM in agreement with recent semi-analytic models of galaxy evolution (L-GALAXIES 2020; Yates et al. 2021).

Although the scatter is larger in the NOX22 results, there is nevertheless an indication that the emission and absorption metallicities still trace each other. This is especially true when using the $R_{23}$ diagnostic. These results thus still offer the possibility of combining emission and absorption line probes to study the cosmic chemical evolution in high-z galaxies, as long as the relation between emission and absorption metallicities can be quantified with a larger sample.

The NOX22, SST23 and LMC23 diagnostics all yield metallicities for the host galaxy of GRB 090323 (star symbol in Figs 3 and 4) that are a factor of ~5 smaller than the absorption line metallicity. In contrast, the DKS16 $N_2S_2H\alpha$ diagnostic gives a metallicity that are in very good agreement with the absorption metallicity for GRB 090323, and the $N_2S_2H\alpha$ metallicities for the two QSO-

DLA counterparts with [N II]$\lambda\lambda6549,6584$ and [S II]$\lambda\lambda6717,6731$ line detections (QSO-DLAS J0441-4313 and J1544+5912) and also consistent with the absorption metallicity (see Fig. 5, bottom right panel). We discuss the $N_2S_2H\alpha$ diagnostic and the case of GRB 090323 in more detail in the next section.

## 5.2 The host galaxy and afterglow of GRB090323

Aside from appearing as an outlier in the emission and absorption metallicity parameter space, the host galaxy of GRB 090323 was also unusual in its high absorption line metallicity ($[M/H]=0.41 \pm 11$) compared to the rest of the GRB host galaxy sample, and to the population of GRB-DLAs (e.g. Cucchiara et al. 2015; De Cia et al. 2018), which at $z = 3.57$, is all the more extraordinary. There is one QSO-DLA in our comparison sample that also has a super-solar absorption line metallicity (J0441-4313), although it is at much lower redshift than GRB 090323 ($z = 0.10$).

The difference in the NOX22 and LMC23 emission line metallicities considered here and the absorption metallicity of GRB 090323 is driven by the significantly higher $R_2$ and $R_3$ values than expected given its absorption line metallicity (see Fig. 5). In contrast, the N/O ratio determined using the strong line diagnostic from Thurston, Edmunds & Henry (1996) is $\log (\text{N/O}) = -0.61 \pm 0.13$ or $\log (\text{N/O}) = -0.57 \pm 0.10$ when using the diagnostic from Pérez-Montero & Contini (2009), which although high, is consistent with the N/O-H relation from Andrews & Martini (2013) when extrapolated to the super-solar metallicity measured in absorption. This GRB host galaxy therefore has non-standard line ratios with either enhanced $R_3$ and $R_2$ if the absorption line metallicity is assumed, or, if the $R_{23}$ and $R_3$ NOX22 emission line metallicities are true, then a significantly enhanced N/O ratio. Below we consider these two possibilities and corresponding implications separately.

The former scenario, where the $R_2$ and $R_3$ lines ratios are enhanced, would have been possible in the presence of an AGN, which can boost the $R_3$ ratio. However, the [O III]$\lambda5007/H\beta$, [N II]$\lambda6584/H\alpha$ and [S II]$\lambda6717,6731/H\alpha$ line ratios place the host galaxy of GRB 090323 within the star-forming region of the Baldwin-Phillips-Terlevich, or so-called ‘BPT’ diagram (Baldwin, Phillips & Terlevich 1981), and of the [S II] variant of the BPT diagram (Veilleux & Osterbrock 1987), indicating that the observed line emission is excited by stars only, and not an AGN. Instead, the apparent enhanced [O III]$\lambda5007$ and [O II]$\lambda3726,3729$ line fluxes may be a result of selection effects in the current samples used to calibrate the metallicity diagnostics, which do not include high-z galaxies with $12 + \log (\text{O/H}) \gtrsim 8.4$. This would not affect the majority of our galaxy sample, with the host galaxy of GRB 090323 being the only case where the metallicity may be $12 + \log (\text{O/H}) \gg 8.4$. It is also worth noting that, for its given stellar mass and SFR, the metallicities obtained from the NOX22 diagnostics for the host galaxy of GRB090323 are in reasonable agreement with those inferred from the $R_{23}$-dominated MZR at $z = 3.5$ ($12 + \log (\text{O/H}) = 8.3$; Mannucci et al. 2009) and FMR ($12 + \log (\text{O/H}) = 8.5$; Mannucci et al. 2010). This at least indicates that the oxygen emission lines in the host galaxy of GRB090323 are comparable to other star-forming galaxies at high-z of the same stellar mass and SFR. One way to investigate possible selection effects at high metallicity in diagnostic calibration samples could be to study the dependence between $R_2$ and $R_3$ as a function of stellar mass at high-z, which would reduce the selection effects present at the high mass end since no weak spectral lines are needed.

The alternative scenario that the N/O (and thus N/S) ratio is enhanced, would cause the DKS16 metallicity to be over-estimated,
<figure><img src="image_7.png" /><figcaption>**Figure 6.** The NOX22 $R_{23}$ and $R_3$ and the LMC23 $\hat{R}$ emission line metallicities against absorption line metallicities, as in Fig. 3, but now colour-coded by the HI column density, $N_{HI}$.</figcaption></figure>

since a fixed N/O-O/H relation is assumed in this diagnostic. It would then just be a coincidence that the GRB absorption metallicity and host galaxy log (N/O) ratio are consistent with the locally observed N/O-O/H relation, which is the reason for the good agreement between the absorption and the DKS16 metallicity. A metallicity of 12 + log (O/H) ~ 8.4 as measured with the NOX22 diagnostics would put the N/O ratio a factor of 10 above what is observed in the local Universe. Although a small sample of nearby GRB host galaxies ($z < 0.1$) with $T_e$-based metallicity measurements have previously been found to have enhanced N/O ratios (Wiersema et al. 2007), the ratios were not as large as is observed in the host galaxy of GRB 090323. The N/O ratio that we report here is based on strong emission lines, and as such is diagnostic-dependent. The Thurston, Edmunds & Henry (1996) diagnostic can over-predict N/O by up to 0.3 dex compared to measurements using auroral lines (e.g. Kojima et al. 2017), although this is a worse case scenario. Even when using auroral lines to measure the N/O ratio, there is dispersion in the O/H-N/O relation, which has been found to correlate with $EW(H\beta)$ (Izotov et al. 2006) and SFR (Andrews & Martini 2013). The dispersion has further been found to decrease when considering the relation between N/O and galaxy stellar mass (Pérez-Montero & Contini 2009; Andrews & Martini 2013; Masters, Faisst & Capak 2016). However, even when taking this into account, the N/O ratio observed in the host galaxy of GRB 090323 continues to be ~0.4 dex higher than expected.

N/O ratios enhanced by >1 dex have been observed in other galaxies at $z \approx 3-10$ with metallicities in the range 12 + log (O/H) = 7.5-8.0 and N/O ratios log (N/O) = -0.7 to -0.1 (Fosbury et al. 2003; Christensen et al. 2012; Bunker et al. 2023; Cameron et al. 2023; Marques-Chaves et al. 2024). Such non-standard relative abundances have been observed in globular clusters (GCs), leading to the suggestion that high-$z$ galaxies with an enhanced N/O may contain proto-GCs (Cameron et al. 2023; Senchyna et al. 2023; Marques-Chaves et al. 2024). Suggested origins for high N/O ratios at high-$z$ are very-massive or super-massive stars that efficiently pollute their environment with hydrogen-burning elements (Gieles et al. 2018; Cameron et al. 2023; Nagele & Umeda 2023; Vink 2023; Watanabe et al. 2024), and the enhancement of nitrogen from the stellar winds of young Wolf-Rayet (WR) stars that are in the hydrogen burning phase (WN phase), with fast rotation further extending this phase (Vangioni et al. 2018; Cameron et al. 2023; Kobayashi & Ferrara 2024; Senchyna et al. 2023; Marques-Chaves et al. 2024). These effects may also occur alongside specific star formation histories (Kobayashi & Ferrara 2024). Inflows have also been used to explain the N/O enhancement whereby accretion of pristine gas dilutes the metallicity without affecting the N/O ratio

(e.g. Köppen & Hensler 2005; Andrews & Martini 2013; Kojima et al. 2017).

The fact that the NOX22 metallicities place the host galaxy of GRB 090323 in a similar region of the N/O-O/H parameter space as other high-$z$ galaxies could be taken as indication that the NOX22 metallicities are correct, but an explanation is then needed for why the absorption metallicity is so much larger. One possibility is that the GRB line of sight crossed a particularly metal-rich but non-representative cloud within the host galaxy, which could arise if the galaxy had a very inhomogeneous metallicity distribution. As already mentioned in Section 3.3, two strong absorbers were detected in the afterglow of GRB 090323, which were attributed to absorption from two interacting systems separated by $\Delta v = 660$ km s$^{-1}$ (Savaglio et al. 2012). Both absorbers were found to have super-solar metallicities (Savaglio et al. 2012), but it may be possible that these metal-rich absorbers are mixed in with other regions of metal-poor gas. For example, there is evidence that bursts of star formation and induced pristine gas accretion in strongly interacting galaxies can introduce significant variation in the metallicity of the interacting system (Michel-Dansac et al. 2008; Perez, Michel-Dansac & Tissera 2011; Torrey et al. 2012; Grønnow, Finlator & Christensen 2015; Torrey et al. 2019; Sparre et al. 2022). The absorption metallicity given in Table 4 is the metallicity measured from the total absorption profile (Wiseman et al. 2017). The NOX22 and LMC23 diagnostics considered in this paper are calibrated against stacked SDSS spectra from Curti et al. (2017) at the high metallicity end (12 + log (O/H) $\gtrsim$ 8.4), and thus the absorption and emission line metallicities both correspond to averaged measurements. To check that the possible contribution to the observed spectrum from two emission components is not the cause of the unusual line ratios, we measured the emission metallicity and N/O ratio using the results from our two component fits to the [N II]$\lambda\lambda$6549,6584 and H$\alpha$ lines (Section 3.3 and Fig. A5). The results remained very comparable, with NOX22 metallicities of 12 + log (O/H) ~ 8.3 and slightly lower N/O ratios in the range log (N/O) ~ -0.7 to -0.8, but still well above the typical values expected from the locally observed N/O-O/H relation.

It is therefore not clear what the origin is of the large disagreement between the absorption and NOX22 and LMC23 emission line metallicities for the host galaxy of GRB 090323, with both the possibility of either enhanced $R_3$ and $R_2$ line ratios, or of an enhanced N/O ratio, implying an atypical ISM in a potentially merging galaxy. The $N_2S_2H\alpha$ diagnostic has also been found to give good agreement with the metallicities of H II regions predicted by the BPASS (Binary Population and Spectral Synthesis; Stanway, Eldridge & Becker 2016; Eldridge et al. 2017; Xiao, Stanway &
Eldridge 2018), and metallicity gradients predicted by the modified L-GALAXIES 2000 galaxy evolution model (Yates et al. 2021). Although this may be a byproduct of assumptions made on the N/O-O/H relation in these simulations. It should be possible to further verify the robustness of the $N_2S_2H\alpha$ diagnostic with future, more sensitive JWST observations capable of detecting the weaker $[N\text{II}]\lambda\lambda6549,6584$ and $[S\text{II}]\lambda\lambda6717,6731$ line doublets in all but the most metal right galaxies in our sample.

## 5.3 Comparison with simulations

Several efforts have been made to quantify the relation between single sightline absorption metallicities and galaxy-integrated emission line metallicities using cosmological hydrodynamical simulations (Metha & Trenti 2020; Metha, Cameron & Trenti 2021; Arabsalmani et al. 2023; Metha & Trenti 2023). These have generally found absorption line metallicities to be lower than emission line metallicities, although the difference is smaller for more metal-rich host galaxies and sightlines. The results from our GRB host galaxy sample are in qualitative agreement with this prediction when using the NOX22 $R_{23}$ and $R_3$ diagnostics, with the emission metallicities being generally larger than the absorption metallicities, but with increased agreement for higher metallicity absorbers (see Fig. 3). Arabsalmani et al. (2023) used the Evolution and Assembly of GaLaxies and their Environments (EAGLE) simulations (Schaye et al. 2015) to investigate third parameter dependencies on the absorption-emission line metallicity relation. They found that absorber sightlines with very small impact parameters or offsets from the galaxy centre, which thus probe a higher column density of material within the galaxy disc, had absorption metallicities that were in better agreement with the average metallicity of the star-forming regions (probed by emission lines). In our GRB and QSO-DLA sample we do not find any dependence on the difference in absorption and emission line metallicities with impact parameter (Figs 3 and 4). However, the impact parameters of our QSO-DLA sample are generally large (>6 kpc), whereas the good agreement between absorption and emission line metallicities predicted by the EAGLE simulations is generally for impact parameters $b < 0.05*R_{200}$ where $R_{200}$ is the radius from the galaxy centre where the average density is 200 times the critical density at the respective redshift. Typical values of $R_{200}$ in EAGLE are 40–90 kpc, and $0.05*R_{200}$ thus corresponds to 2.0–4.5 kpc. Nevertheless, although we do not know the offset of the GRB position from the host galaxy centre for the majority of our sample, on average we would expect GRBs to probe the very central regions of their host galaxies. The fact that our GRB sample of data points in Figs 3 and 4 do not appear to lie closer to the line of equality (black dashed) than the distribution of QSO-DLA data points thus seems contrary to the predictions from the EAGLE simulations. Nevertheless, there is of course the complication that more massive galaxies will be physically larger, making comparisons between absolute offsets of impact parameters less meaningful. A fairer comparison may thus be to use the impact parameter normalized by the galaxy effective radius, although at $z > 2$ the emission counterparts to QSO-DLAs appear to have comparable effective radii to GRB host galaxies (Blanchard, Berger & Fong 2016; Rhodin et al. 2021).

Smaller impact parameters have been found to have larger HI column densities, $N_{HI}$, (Chen & Lanzetta 2003; Chen, Kennicutt & Rauch 2005; Christensen et al. 2007; Péroux et al. 2016; Krogager et al. 2017; Kulkarni et al. 2022; Arabsalmani et al. 2023), which can be understood by the fact that the sightline probes more central, and thus denser regions of the host galaxy (e.g Krogager et al. 2020).

One may therefore expect greater agreement between absorption and emission line metallicities for those sightlines with larger HI column density. $N_{HI}$ is a parameter that is measured for our complete GRB and QSO-DLA sample by selection, and in Fig. 6, we thus plot the emission against absorption line metallicity for the NOX22 and LMC23 diagnostics, as in Figs 3 and 4, but now with the data points colour-coded by the $N_{HI}$. There is a possible indication that data points in the lower left of the plots in Fig. 6 have the largest column densities, and $N_{HI}$ decreases as we go to larger metallicities, at the top right corner of the plots. However, the relative offsets between the absorption and emission line metallicities do not show any clear dependence with $N_{HI}$. The results from Arabsalmani et al. (2023) imply some level of dependency on the relation between absorption and emission metallicities with $N_{HI}$, but they found large scatter in the relation due to the intrinsic inhomogenities that exist in galaxies. It is therefore possible that we do not see a clear absorption metallicity-emission metallicity-$N_{HI}$ dependence in our observations due to our small sample size. Nevertheless, by investigating the dependence of the relation between the emission and absorption metallicities with $N_{HI}$ we can at least include the GRB host galaxy sample (unlike when considering impact parameter).

The lack of any clear, third-parameter dependency on the relation between absorption and NOX22 emission line metallicities along GRB and QSO-DLA sightlines may also imply that metals within the neutral phase ISM (and possibly also CGM) are poorly mixed, and the scatter observed in Figs 3 and 6 could thus be indicative of the large intrinsic variation in the regions of the galaxy probed in absorption depending on the line of sight. Sightlines with the same impact parameter and $N_{HI}$ may probe very different regions of the galaxy depending on the galaxy orientation, the stellar mass, and the level of mixing, which in turn is dependent on feedback processes. Moreover, whereas QSO-DLA sightlines will cross through the full radial extent of the intervening galaxy, GRBs may lie at the front side of their host galaxy, and thus on average their sightlines will cross through 50 per cent of the galaxy along the radial direction. However, the good agreement between absorption and emission line metallicities when using the $\hat{R}$ diagnostic implies that the metallicity of the ionized and neutral material is relatively homogeneous, and that the effect of any metallicity gradients are averaged out along the radial and longitudinal direction in absorption and emission line probes. To understand the lack of an $N_{HI}$-dependency in this case may therefore require analysis using zoom-in hydrodynamic simulations that include the relevant physics on the formation of molecular clouds and stellar feedback that is necessary to capture the smaller scale inhomogeneities present in star-forming regions and the ISM.

It will also be important to increase the samples of QSO-DLA and GRBs with both emission and absorption line metallicites in order to be able to average out the intrinsic scatter that is likely introduced by the pencil-beam sightline offered by GRBs and QSO-DLAs. Knowing the characteristic properties of the GRB host galaxies and QSO-DLA emission counterparts is also important to be able to study the emission-absorption metallicity relation in bins of stellar mass, normalized impact parameter and $N_{HI}$, for example.

## 6 CONCLUSIONS

In this paper we present the first investigation on a sample of GRB host galaxies on the relation between the gas-phase metallicity in star-forming regions and in the neutral cold interstellar gas. This is probed through emission and absorption using the incredible IR sensitivity of NIRSpec as part of our cycle-1 JWST programme. We find good agreement between the absorption metallicities and the emission
metallicities determined with the LMC23 R̂ diagnostic ($\sigma$ = 0.2 dex). The DKS16 N$_2$S$_2$H$\alpha$ diagnostic also shows promise, but a larger sample of galaxies with [S II]λ6717,6731 detections is required to verify the consistency with the N$_2$S$_2$H$\alpha$ diagnostic. Although our results are dependent on the emission line metallicity diagnostic, we find that, when considering only the most reliable emission diagnostics, there is a relation between the two metallicity probes (even if not one-to-one). This opens the possibility of combining both emission and absorption line probes in the future to study the cosmic chemical evolution down to lower mass galaxies than is currently possible through emission line studies alone. At high-z GRBs are likely to have small and faint host galaxies that could be significant sources of ionizing photons (Salvaterra et al. 2013), but for which spectra cannot be taken even with NIRSpec. The combination of emission and absorption line probes could therefore provide a less biased view of the chemical enrichment of galaxies at high-z.

The first results on new strong-line metallicity diagnostics for high-z galaxies based on sensitive JWST data have started to be published, but significant progress is still required in the size of the calibration samples currently available, and especially in the range of galaxy properties covered by the calibration samples. A more conclusive analysis on the relation between emission and absorption line metallicities may thus require GRB host galaxies with direct, $T_{e}$-based emission line metallicities. In order to detect the temperature-sensitive, weak auroral lines in our sample of GRB host galaxies, of which [O III]λ4363 is the strongest, each galaxy would need to be observed for several hours, even with JWST. Nevertheless, the resulting observations would provide possibly the only definitive result on how absorption and emission line metallicities compare, paving a way for both probes to be used in unison, as well as enabling the relation between the ionized and neutral phase gas in the ISM of high-z galaxies to be investigated.

## ACKNOWLEDGEMENTS

We thank C. Ledoux for sharing the results from their absorption line analysis on the afterglow UVES spectrum of GRB 080804. PS acknowledges support from the UK Science and Technology Facilities Council, grant reference ST/X001067/1. LC is supported by DFF/Independent Research Fund Denmark, grant-ID 2032-00071. The Cosmic Dawn Center (DAWN) is funded by the Danish National Research Foundation under grant DNRF140. ADC acknowledges support from the Swiss National Science Foundation under grant 185692. AR acknowledges support from the INAF project Premiale Supporto Arizona & Italia. RGB acknowledges financial support from the Severo Ochoa grant CEX2021-001131-S funded by MCIN/AEI/10.13039/501100011033 and to PID2022-141755NB-I00.

## DATA AVAILABILITY

The data underlying this article are available in the MAST Data Discovery Portal at https://stdatu.stsci.edu/datadownloads.html and can be accessed with proposal ID 2344.

## REFERENCES

* Andrews B. H., Martini P., 2013, ApJ, 765, 140

* Arabsalmani M. et al., 2023, ApJ, 952, 67

* Arellano-Córdova K. Z. et al., 2022, ApJ, 940, L23

* Asplund M., Grevesse N., Sauval A. J., Scott P., 2009, ARA&A, 47, 481

* Asplund M., Amarsi A. M., Grevesse N., 2021, A&A, 653, A141

* Baldwin J. A., Phillips M. M., Terlevich R., 1981, PASP, 93, 5

* Becker G. D., Sargent W. L. W., Rauch M., Carswell R. F., 2012, ApJ, 744, 91

* Behroozi P. S., Conroy C., Wechsler R. H., 2010, ApJ, 717, 379

* Berg T. A. M., Ellison S. L., Prochaska J. X., Venn K. A., Dessauges-Zavadsky M., 2015, MNRAS, 452, 4326

* Bian F., Kewley L. J., Dopita M. A., 2018, ApJ, 859, 175

* Blanchard P. K., Berger E., Fong W.-F., 2016, ApJ, 817, 144

* Bolmer J. et al., 2019, A&A, 623, A43

* Bouché N., Murphy M. T., Kacprzak G. G., Péroux C., Contini T., Martin C. L., Dessauges-Zavadsky M., 2013, Science, 341, 50

* Bunker A. J. et al., 2023, A&A, 677, A88

* Cameron A. J. et al., 2023, A&A, 677, A115

* Cano Z., Wang S.-Q., Dai Z.-G., Wu X.-F., 2017, Adv. Astron., 2017, 8929054

* Cardelli J. A., Clayton G. C., Mathis J. S., 1989, ApJ, 345, 245

* Chabrier G., 2003, PASP, 115, 763

* Chen H.-W., 2012, MNRAS, 419, 3039

* Chen H.-W., Lanzetta K. M., 2003, ApJ, 597, 706

* Chen H.-W., Kennicutt Robert C. J., Rauch M., 2005, ApJ, 620, 703

* Chen H.-W. et al., 2009, ApJ, 691, 152

* Chornock R., Perley D. A., Cenko S. B., Bloom J. S., 2009, GRB Coordinates Netw., 9028, 1

* Christensen L., Wisotzki L., Roth M. M., Sánchez S. F., Kelz A., Jahnke K., 2007, A&A, 468, 587

* Christensen L., Vreeswijk P. M., Sollerman J., Thöne C. C., Le Floc'h E., Wiersema K., 2008, A&A, 490, 45

* Christensen L. et al., 2012, MNRAS, 427, 1973

* Christensen L., Møller P., Fynbo J. P. U., Zafar T., 2014, MNRAS, 445, 225

* Cucchiara A., Fumagalli M., Rafelski M., Kocevski D., Prochaska J. X., Cooke R. J., Becker G. D., 2015, ApJ, 804, 51

* Curti M., Cresci G., Mannucci F., Marconi A., Maiolino R., Esposito S., 2017, MNRAS, 465, 1384

* Curti M. et al., 2023a, preprint (arXiv:2304.08516)

* Curti M. et al., 2023b, MNRAS, 518, 425

* D'Elia V. et al., 2014, A&A, 564, A38

* De Cia A., Ledoux C., Savaglio S., Schady P., Vreeswijk P. M., 2013, A&A, 560, A88

* De Cia A., Ledoux C., Mattsson L., Petitjean P., Srianand R., Gavignaud I., Jenkins E. B., 2016, A&A, 596, A97

* De Cia A., Ledoux C., Petitjean P., Savaglio S., 2018, A&A, 611, A76

* De Cia A. et al., 2024, preprint (arXiv:2401.07963)

* Dopita M. A., Kewley L. J., Sutherland R. S., Nicholls D. C., 2016, Ap&SS, 361, 61

* Eldridge J. J., Stanway E. R., Xiao L., McClelland L. A. S., Taylor G., Ng M., Greis S. M. L., Bray J. C., 2017, Publ. Astron. Soc. Aust., 34, e058

* Esteban C., Bresolin F., Peimbert M., García-Rojas J., Peimbert A., Mesa-Delgado A., 2009, ApJ, 700, 654

* Esteban C., García-Rojas J., Carigi L., Peimbert M., Bresolin F., López-Sánchez A. R., Mesa-Delgado A., 2014, MNRAS, 443, 624

* Fosbury R. A. E. et al., 2003, ApJ, 596, 797

* Fox A. J., Ledoux C., Vreeswijk P. M., Smette A., Jaunsen A. O., 2008, A&A, 491, 189

* Friis M. et al., 2015, MNRAS, 451, 167

* Fruchter A. S. et al., 2006, Nature, 441, 463

* Fukugita M., Peebles P. J. E., 2004, ApJ, 616, 643

* Fumagalli M., O'Meara J. M., Prochaska J. X., Rafelski M., Kanekar N., 2015, MNRAS, 446, 3178

* Fynbo J. P. U. et al., 2009, ApJS, 185, 526

* Fynbo J. P. U. et al., 2010, MNRAS, 408, 2128

* Fynbo J. P. U. et al., 2011, MNRAS, 413, 2481

* Fynbo J. P. U. et al., 2013, MNRAS, 436, 361

* Galama T. J. et al., 1998, Nature, 395, 670

* Gieles M. et al., 2018, MNRAS, 478, 2461

* Gompertz B. P. et al., 2023, Nature Astron., 7, 67

* Graham J. F., Schady P., Fruchter A. S., 2023, ApJ, 954, 13

* Greiner J. et al., 2008, PASP, 120, 405

* Grønnow A. E., Finlator K., Christensen L., 2015, MNRAS, 451, 4005

* Hartoog O. E. et al., 2015, A&A, 580, A139
Heintz K. E. et al., 2023a, A&A, 679, A91, https://ui.adsabs.harvard.edu/abs/2023A&A...679A..91H

Heintz K. E. et al., 2023b, Nature Astron., 7, 1517

Hirschmann M., Charlot S., Somerville R. S., 2023, MNRAS, 526, 3504, https://ui.adsabs.harvard.edu/abs/2023MNRAS.526.3504H

Hjorth J. et al., 2003, Nature, 423, 847

Izotov Y. I., Stasińska G., Meynet G., Guseva N. G., Thuan T. X., 2006, A&A, 448, 955

Jakobsen P. et al., 2022, A&A, 661, A80

Kawai N. et al., 2006, Nature, 440, 184

Kennicutt R. C., Jr., 1998, ARA&A, 36, 189

Kewley L. J., Dopita M. A., 2002, ApJS, 142, 35

Kewley L. J., Ellison S. L., 2008, ApJ, 681, 1183

Kewley L. J., Dopita M. A., Leitherer C., Davé R., Yuan T., Allen M., Groves B., Sutherland R., 2013, ApJ, 774, 100

Kobayashi C., Ferrara A., 2024, ApJ, 962, L6, https://ui.adsabs.harvard.edu/abs/2024ApJ...962L...6K

Kobulnicky H. A., Kewley L. J., 2004, ApJ, 617, 240

Kojima T., Ouchi M., Nakajima K., Shibuya T., Harikane Y., Ono Y., 2017, PASJ, 69, 44

Köppen J., Hensler G., 2005, A&A, 434, 531

Kriek M. et al., 2015, ApJS, 218, 15

Krogager J. K., Fynbo J. P. U., Møller P., Ledoux C., Noterdaeme P., Christensen L., Milvang-Jensen B., Sparre M., 2012, MNRAS, 424, L1

Krogager J. K., Møller P., Fynbo J. P. U., Noterdaeme P., 2017, MNRAS, 469, 2959

Krogager J.-K. et al., 2013, MNRAS, 433, 3091

Krogager J.-K., Møller P., Christensen L. B., Noterdaeme P., Fynbo J. P. U., Freudling W., 2020, MNRAS, 495, 3014

Krühler T., Schady P., 2017, Photometry and Stellar Masses for GRB Host Galaxies with Emission-line Spectra, figshare, dataset

Krühler T. et al., 2013, A&A, 557, A18

Krühler T. et al., 2015, A&A, 581, A125

Krühler T., Kuncarayakti H., Schady P., Anderson J. P., Galbany L., Gensior J., 2017, A&A, 602, A85

Kulkarni V. P., Bowen D. V., Straka L. A., York D. G., Gupta N., Noterdaeme P., Srianand R., 2022, ApJ, 929, 150

Laseter I. H. et al., 2023, A&A, 681, A70, https://ui.adsabs.harvard.edu/abs/2024A&A...681A...70L

Laskar T., Berger E., Chary R.-R., 2011, ApJ, 739, 1

Ledoux C. et al., 2005, GRB Coordinates Netw., 3860, 1

Ledoux C., Vreeswijk P. M., Smette A., Fox A. J., Petitjean P., Ellison S. L., Fynbo J. P. U., Savaglio S., 2009, A&A, 506, 661

Levan A. et al., 2023, Natur, 626, 737, https://ui.adsabs.harvard.edu/abs/2024Natur.626..737L

Maiolino R. et al., 2008, A&A, 488, 463

Mannucci F. et al., 2009, MNRAS, 398, 1915

Mannucci F., Cresci G., Maiolino R., Marconi A., Gnerucci A., 2010, MNRAS, 408, 2115

Mannucci F., Salvaterra R., Campisi M. A., 2011, MNRAS, 414, 1263

Marques-Chaves R. et al., 2024, A&A, 681, A30

Masters D., Faisst A., Capak P., 2016, ApJ, 828, 18

McGaugh S. S., Schombert J. M., de Blok W. J. G., Zagursky M. J., 2010, ApJ, 708, L14

Metha B., Trenti M., 2020, MNRAS, 495, 266

Metha B., Trenti M., 2023, MNRAS, 520, 879

Metha B., Cameron A. J., Trenti M., 2021, MNRAS, 504, 5992

Michel-Dansac L., Lambas D. G., Alonso M. S., Tissera P., 2008, MNRAS, 386, L82

Nagele C., Umeda H., 2023, ApJ, 949, L16

Nakajima K. et al., 2022, ApJS, 262, 3

Nakajima K., Ouchi M., Isobe Y., Harikane Y., Zhang Y., Ono Y., Umeda H., Oguri M., 2023, ApJS, 269, 33, https://ui.adsabs.harvard.edu/abs/2023ApJS...269...33N

Neeleman M., Wolfe A. M., Prochaska J. X., Rafelski M., 2013, ApJ, 769, 54

Osterbrock D. E., 1989, Ann. New York Acad. Sci., 571, 99

Palmerio J. T. et al., 2019, A&A, 623, A26

Patrício V., Christensen L., Rhodin H., Cañamas R., Lara-López M. A., 2018, MNRAS, 481, 3520

Peeples M. S., Werk J. K., Tumlinson J., Oppenheimer B. D., Prochaska J. X., Katz N., Weinberg D. H., 2014, ApJ, 786, 54

Pei Y. C., 1992, ApJ, 395, 130

Peimbert M., 1967, ApJ, 150, 825

Peimbert M., Storey P. J., Torres-Peimbert S., 1993, ApJ, 414, 626
Perez J., Michel-Dansac L., Tissera P. B., 2011, MNRAS, 417, 580

Pérez-Montero E., Contini T., 2009, MNRAS, 398, 949

Perley D. A. et al., 2016, ApJ, 817, 8

Péroux C., Howk J. C., 2020, ARA&A, 58, 363

Péroux C., Bouché N., Kulkarni V. P., York D. G., 2013, MNRAS, 436, 2650

Péroux C. et al., 2016, MNRAS, 457, 903

Pettini M., Pagel B. E. J., 2004, MNRAS, 348, L59

Pilyugin L. S., Grebel E. K., 2016, MNRAS, 457, 3678

Planck Collaboration et al., 2016, A&A, 594, A13

Prochaska J. X., Gawiser E., Wolfe A. M., Cooke J., Gelino D., 2003a, ApJS, 147, 227

Prochaska J. X., Castro S., Djorgovski S. G., 2003b, ApJS, 148, 317

Prochaska J. X., Chen H.-W., Bloom J. S., 2006, ApJ, 648, 95

Prochaska J. X. et al., 2007a, ApJS, 168, 231

Prochaska J. X., Chen H.-W., Dessauges-Zavadsky M., Bloom J. S., 2007b, ApJ, 666, 267

Pugliese V., Xu D., Tanvir N. R., Wiersema K., Fynbo J. P. U., Milvang-Jensen B., D'Elia V., 2015, GRB Coordinates Netw., 17672, 1

Rafelski M., Wolfe A. M., Prochaska J. X., Neeleman M., Mendez A. J., 2012, ApJ, 755, 89

Rahmani H. et al., 2016, MNRAS, 463, 980

Rao S. M., Turnshek D. A., Nestor D. B., 2006, ApJ, 636, 610

Rastinejad J. C. et al., 2022, Nature, 612, 223

Rhoads J. E. et al., 2023, ApJ, 942, L14

Rhodin N. H. P., Christensen L., Møller P., Zafar T., Fynbo J. P. U., 2018, A&A, 618, A129

Rhodin N. H. P., Krogager J. K., Christensen L., Valentino F., Heintz K. E., Møller P., Zafar T., Fynbo J. P. U., 2021, MNRAS, 506, 546

Saccardi A. et al., 2023, A&A, 671, A84

Salpeter E. E., 1955, ApJ, 121, 161

Salvaterra R., Maio U., Ciardi B., Campisi M. A., 2013, MNRAS, 429, 2718

Sanders R. L. et al., 2016, ApJ, 825, L23

Sanders R. L. et al., 2021, ApJ, 914, 19

Sanders R. L., Shapley A. E., Topping M. W., Reddy N. A., Brammer G. B., 2024, ApJ, 962, 24, https://ui.adsabs.harvard.edu/abs/2024ApJ...962...24S

Savaglio S., 2006, New J. Phys., 8, 195

Savaglio S., Fall S. M., Fiore F., 2003, ApJ, 585, 638

Savaglio S. et al., 2012, MNRAS, 420, 627

Schaerer D., Marques-Chaves R., Barrufet L., Oesch P., Izotov Y. I., Naidu R., Guseva N. G., Brammer G., 2022, A&A, 665, L4

Schaye J. et al., 2015, MNRAS, 446, 521

Schlaafly E. F., Finkbeiner D. P., 2011, ApJ, 737, 103

Schulte-Ladbeck R. E., Rao S. M., Drozdovsky I. O., Turnshek D. A., Nestor D. B., Pettini M., 2004, ApJ, 600, 613

Schulte-Ladbeck R. E., König B., Miller C. J., Hopkins A. M., Drozdovsky I. O., Turnshek D. A., Hopp U., 2005, ApJ, 625, L79

Selsing J. et al., 2019, A&A, 623, A92

Senchyna P., Plat A., Stark D. P., Rudie G. C., 2023, preprint (arXiv:2303.04179)

Sparre M., Whittingham J., Damle M., Hani M. H., Richter P., Ellison S. L., Pfrommer C., Vogelsberger M., 2022, MNRAS, 509, 2720

Stanway E. R., Eldridge J. J., Becker G. D., 2016, MNRAS, 456, 485

Steidel C. C. et al., 2014, ApJ, 795, 165

Storey P. J., Zeippen C. J., 2000, MNRAS, 312, 813

Straka L. A., Johnson S., York D. G., Bowen D. V., Florian M., Kulkarni V. P., Lundgren B., Péroux C., 2016, MNRAS, 458, 3760

Strom A. L. et al., 2023, ApJ, 958, L11, https://ui.adsabs.harvard.edu/abs/2023ApJ...958L...11S

Tanvir N. R. et al., 2019, MNRAS, 483, 5380
Teimoorinia H., Jalikhany M., Scudder J. M., Jensen J., Ellison S. L., 2021, MNRAS, 503, 1082

Thöne C. C., de Ugarte Postigo A., Vreeswijk P. M., Malesani D., Jakobsson P., 2008, GRB Coordinates Netw., 8058, 1

Thöne C. C. et al., 2013, MNRAS, 428, 3590

Thurston T. R., Edmunds M. G., Henry R. B. C., 1996, MNRAS, 283, 990

Torrey P., Cox T. J., Kewley L., Hernquist L., 2012, ApJ, 746, 108

Torrey P. et al., 2019, MNRAS, 484, 5587

Troja E. et al., 2022, Nature, 612, 228

Trump J. R. et al., 2023, ApJ, 945, 35

Vangioni E., Dvorkin I., Olive K. A., Dubois Y., Molaro P., Petitjean P., Silk J., Kimm T., 2018, MNRAS, 477, 56

Veilleux S., Osterbrock D. E., 1987, ApJS, 63, 295

Vergani S. D., Petitjean P., Ledoux C., Vreeswijk P., Smette A., Meurs E. J. A., 2009, A&A, 503, 771

Villar-Martín M., Cerviño M., González Delgado R. M., 2004, MNRAS, 355, 1132

Vink J. S., 2023, A&A, 679, L9

Vreeswijk P. M. et al., 2004, A&A, 419, 927

Vreeswijk P. M. et al., 2007, A&A, 468, 83

Vreeswijk P. M. et al., 2013, A&A, 549, A22

Watanabe K. et al., 2024, ApJ, 962, 50, https://ui.adsabs.harvard.edu/abs/2024ApJ...962...50W

Weng S. et al., 2023, MNRAS, 519, 931

Wiersema K. et al., 2007, A&A, 464, 529

Wiseman P., Schady P., Bolmer J., Krühler T., Yates R. M., Greiner J., Fynbo J. P. U., 2017, A&A, 599, A24

Wolfe A. M., Gawiser E., Prochaska J. X., 2005, ARA&A, 43, 861

Woooley S. E., Bloom J. S., 2006, ARA&A, 44, 507

Xiao L., Stanway E. R., Eldridge J. J., 2018, MNRAS, 477, 904

Yates R. M., Henriques B. M. B., Fu J., Kauffmann G., Thomas P. A., Guo Q., White S. D. M., Schady P., 2021, MNRAS,503, 4474, https://ui.adsabs.harvard.edu/abs/2021MNRAS.503.4474Y
APPENDIX A: GAUSSIAN FITS TO SPECTRAL LINES

<figure><img src="image_8.png" /><figcaption>**Figure A1.** Emission line spectra of the host galaxy of GRB 050820A, taken from components A (top), B (middle) and C (bottom). The spectra are zoomed in on [O II]λλ3726,3729 (left), Hβ and [O III]λλ4959,5007 (centre), and Hα (right). In all cases the redshift and velocity dispersion were fixed to the best-fitting values to Hβ and the [O III]λλ4959,5007 doublet. The best-fitting velocity to the lines from component C was below the instrumental resolution, and it was therefore left as a free parameter for all lines, but the redshift was fixed to the best-fitting value to Hβ and [O III]λλ4959,5007. The location of the undetected [N II]λλ6549,6584 line doublet is indicated in the right-most panel in each row. The vertical dotted lines correspond to the observer-frame position of Hα for a systemic redshift *z* = 2.6133 determined from the galaxy-integrated spectrum, which provides an indication of the relative velocity shift of each component. A summary of the best-fitting parameters and line fluxes are given in Table 2.</figcaption></figure>
<figure><img src="image_9.png" /><figcaption>**Figure A2.** Emission line spectra of the host galaxy of GRB 150403A, taken from components A (top), B (middle) and C (bottom). The spectra are zoomed in on [O II]λλ3726,3729 (left), Hβ and [O III]λλ4959,5007 (centre), and Hα (right). For component A, the redshift and velocity dispersion was fixed to the best-fitting values to Hβ and the [O III]λλ4959,5007 doublet. The best-fitting velocity to the lines from component B and C were below the instrumental resolution, and it was therefore left as a free parameter for all lines, but the redshift was fixed to the best-fitting values fitted to Hβ and [O III]λλ4959,5007. As in Fig. A1, the location of the undetected [N II]λλ6549,6584 line doublet is indicated in the right-most panel in each row, and the vertical dotted lines correspond to the observer-frame position of Hα for a systemic redshift *z* = 2.0570 determined from the galaxy-integrated spectrum. A summary of the best-fitting parameters and line fluxes are given in Table 2.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Figure A3.** Spectrum of the host galaxy of GRB030323 (blue data points) zoomed in on the tentative [O II]λλ3726,3729 emission line doublet detection (left), Hβ and [O III]λλ4959,5007 emission lines (middle) and on Hα (right), with best-fitting model overplotted (black line). The location of the undetected [N II]λλ6549,6584 line doublet is indicated in the right-hand panel. The best-fitting velocity dispersion and redshift fitted to Hα is *z* = 3.3710 and σ = 80 ± 15 km s⁻¹, and these values were fixed in the fit to Hβ, [O III]λλ4959,5007 and [O II]λλ3726,3729.</figcaption></figure>
<figure><img src="image_11.png" /></figure>

**Figure A4.** Detected emission lines (blue data points) from the host galaxy of GRB 080804 from [O II]λλ3726,3729 (left), Hβ and the [O III]λλ4959,5007 doublet (middle), and Hα (right), with best-fitting model (black line). The location of the undetected [N II]λλ6549,6584 line doublet is indicated in the right-hand panel. The best-fitting velocity dispersion and redshift from fits to Hα are z = 2.2065 and σ = 148 ± 23 km s⁻¹, and these best-fitting parameters were frozen in the fits to Hβ, [O III]λλ4959,5007 and [O II]λλ3726,3729.

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

**Figure A5.** 2D (top) and 1D (bottom) spectrum of the host galaxy of GRB 090323 zoomed in on the Hα and [N II]λλ6549,6584 lines and fitted with a single (black solid) and a two component model (black dotted), where in the latter case the two best-fitting components are plotted with green dashed and red dot-dashed lines. In both fits the [N II]λλ6549,6584 and Hα lines were fitted simultaneously with the velocity dispersion of each component tied. The best-fitting parameters for the single Gaussian fit (black solid) were z = 3.5844 and σ = 190 ± 5 km s⁻¹, and for the two component fit (black dotted) the best-fitting redshift was unchanged but the velocity dispersion was σ₁ = 221 ± 12 km s⁻¹ and σ₂ < 99 km s⁻¹ for the two respective components.

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

**Figure A6.** Emission line spectra of the host galaxy of GRB 090323, corresponding to [O II]λλ3726,3729 (left), Hβ and [O III]λλ4959,5007 (middle), and [S II]λλ6717,6731 (right). The line peak positions and velocity widths were kept fixed to the best-fitting values fitted to the Hα and [N II]λλ6549,6584 lines (Fig. A5). Note, the data blueward of 1.71 µm shown in the fit to [O II]λλ3726,3729 all show zero flux because they lie below the effective lower-bound of the F170LP filter.
<figure><img src="image_14.png" /><figcaption>**Figure A7.** Emission line spectra of the host galaxy of GRB 100219A (blue data points) zoomed in on Hβ and [O III]λλ4959,5007 (left), and the tentative Hα emission line detection (right). The location of the undetected [N II]λλ6549,6584 line doublet is indicated in the right-hand panel. The best-fitting velocity dispersion and redshift from simultaneous fits to Hβ and [O III]λλ4959,5007 are z = 4.6698 and σ = 66 ± 9 km s⁻¹. The line peak positions and velocity widths were kept fixed to the best-fitting values fitted to the Hβ and [O III]λλ4959,5007 lines.</figcaption></figure>

APPENDIX B: STELLAR SPECTRA OF MISIDENTIFIED TARGETS

<figure><img src="image_15.png" /><figcaption>**Figure B1.** NIRspec spectra of the host galaxy candidates for GRB 120327A (left) and GRB 120815A (right). Both spectra have a continuum shape reminiscent of a blackbody, thus likely corresponding to unrelated foreground stars, with left having a peak temperature of ~3500 K, and the right-hand spectrum being consistent with a hotter star where the NIRspec spectrum covers the Rayleigh-Jeans limits.</figcaption></figure>
APPENDIX C: QSO-DLA ABSORPTION AND EMISSION LINE METALLICITIES

<table><caption>Table C1. Absorption and emission line metallicities for QSO sample.</caption><thead><tr><th>QSO</th><th>z<sub>abs</sub></th><th>abs</th><th>NOX22 R<sub>23</sub></th><th>12 + log (O/H) NOX R<sub>3</sub></th><th>LMC23 R&#770;</th><th>DKS16</th></tr></thead><tbody><tr><td>J0238+1636</td><td>0.5253</td><td>8.09 ± 0.40<sup>a</sup></td><td>8.32 ± 0.01</td><td>8.32 ± 0.02</td><td>7.84 ± 0.05</td><td>...</td></tr><tr><td>J0441-4313</td><td>0.1010</td><td>8.79 ± 0.15<sup>a</sup></td><td>8.64 ± 0.02</td><td>8.76 ± 0.01</td><td>8.82 ± 0.01</td><td>8.77 ± 0.01</td></tr><tr><td>J0830+2410</td><td>0.5263</td><td>8.20 ± 0.30<sup>a</sup></td><td>8.22 ± 0.03</td><td>8.02 ± 0.08</td><td>...</td><td>...</td></tr><tr><td>J0918+1636</td><td>2.583</td><td>8.57 ± 0.05<sup>b</sup></td><td>8.39 ± 0.07</td><td>8.48 ± 0.07</td><td>8.56 ± 0.07</td><td>...</td></tr><tr><td>J0958+0549</td><td>0.6546</td><td>7.36 ± 0.23<sup>c</sup></td><td>8.27 ± 0.04</td><td>8.39 ± 0.02</td><td>7.59 ± 0.05</td><td>...</td></tr><tr><td>J1138+0139</td><td>0.6126</td><td>7.91 ± 0.16<sup>c</sup></td><td>8.59 ± 0.15</td><td>8.42 ± 0.06</td><td>8.12 ± 0.12</td><td>...</td></tr><tr><td>J1204+0953</td><td>0.6390</td><td>7.97 ± 0.16<sup>c</sup></td><td>...</td><td>...</td><td>7.73 ± 0.29</td><td>...</td></tr><tr><td>J1436-0051</td><td>0.7390</td><td>8.64 ± 0.12<sup>d</sup></td><td>8.54 ± 0.03</td><td>8.73 ± 0.02</td><td>8.81 ± 0.02</td><td>...</td></tr><tr><td>J1544+5912</td><td>0.0102</td><td>8.19 ± 0.33<sup>e</sup></td><td>8.33 ± 0.04</td><td>8.28 ± 0.08</td><td>8.24 ± 0.13</td><td>7.91 ± 0.17</td></tr><tr><td>J2222-0946</td><td>2.354</td><td>8.20 ± 0.05<sup>f, g</sup></td><td>8.03 ± 0.05</td><td>8.03 ± 0.09</td><td>8.12 ± 0.07</td><td>...</td></tr><tr><td>J2247-6015</td><td>2.33</td><td>7.97 ± 0.05<sup>h</sup></td><td>8.38 ± 0.07</td><td>8.20 ± 0.13</td><td>8.12 ± 0.03</td><td>...</td></tr></tbody></table>

† Absorption-based metallicity relative to solar and corrected for dust depletion. To convert to units of [M/H], more commonly used in GRB absorption line studies, we need to subtract the solar metallicity value 12+log(O/H) = 8.69 (Asplund et al. 2009).

<sup>a</sup> Chen, Kennicutt & Rauch (2005); <sup>b</sup> Fynbo et al. (2013); <sup>c</sup> Rahmani et al. (2016); <sup>d</sup> Straka et al. (2016); <sup>e</sup> Schulte-Ladbeck et al. (2004);

<sup>f</sup> Fynbo et al. (2010); <sup>g</sup> Krogager et al. (2013); <sup>h</sup> Bouché et al. (2013)

APPENDIX D: ABSORPTION LINE VERSUS SST23 EMISSION LINE METALLICITIES

<table><caption>Table D1. SST23 R<sub>23</sub>, R<sub>3</sub>, R<sub>2</sub> and O<sub>32</sub> emission line metallicities for GRB host galaxy sample.</caption><thead><tr><th rowspan="2">GRB host</th><th colspan="4">12 + log (O/H)</th></tr><tr><th>R<sub>23</sub></th><th>R<sub>3</sub></th><th>R<sub>2</sub></th><th>O<sub>32</sub></th></tr></thead><tbody><tr><td>030323</td><td>7.48 ± 0.45</td><td>7.50 ± 0.42</td><td>7.84 ± 0.23</td><td>8.00 ± 0.16</td></tr><tr><td>050820A</td><td>7.93 ± 0.27</td><td>7.87 ± 0.45</td><td>8.32 ± 0.06</td><td>8.32 ± 0.04</td></tr><tr><td>component A</td><td>7.90 ± 0.35</td><td>7.86 ± 0.48</td><td>8.27 ± 0.06</td><td>8.27 ± 0.04</td></tr><tr><td>component B</td><td>7.80 ± 0.23</td><td>7.68 ± 0.29</td><td>8.29 ± 0.11</td><td>8.29 ± 0.10</td></tr><tr><td>component C</td><td>7.80 ± 0.23</td><td>7.82 ± 0.45</td><td>8.30 ± 0.10</td><td>8.29 ± 0.07</td></tr><tr><td>080804</td><td>7.61 ± 0.42</td><td>7.51 ± 0.41</td><td>8.24 ± 0.17</td><td>8.29 ± 0.05</td></tr><tr><td>090323</td><td>7.22 ± 0.10</td><td>7.09 ± 0.05</td><td>8.16 ± 0.14</td><td>8.35 ± 0.07</td></tr><tr><td>100219A</td><td>7.10 ± 0.10</td><td>7.12 ± 0.12</td><td>7.60 ± 0.09</td><td>7.85 ± 0.05</td></tr><tr><td>150403A</td><td>7.39 ± 0.21</td><td>7.22 ± 0.11</td><td>8.16 ± 0.23</td><td>8.28 ± 0.13</td></tr><tr><td>component A</td><td>7.14 ± 0.14</td><td>7.10 ± 0.10</td><td>8.01 ± 0.12</td><td>8.26 ± 0.10</td></tr><tr><td>component B</td><td>7.29 ± 0.17</td><td>7.14 ± 0.12</td><td>8.20 ± 0.09</td><td>8.38 ± 0.03</td></tr><tr><td>component C</td><td>7.74 ± 0.30</td><td>7.63 ± 0.29</td><td>8.21 ± 0.20</td><td>8.21 ± 0.15</td></tr><tr><td>120815A</td><td>7.60 ± 0.44</td><td>7.51 ± 0.41</td><td>7.96 ± 0.46</td><td>8.14 ± 0.27</td></tr><tr><td>121024A</td><td>7.33 ± 0.08</td><td>7.27 ± 0.07</td><td>7.92 ± 0.06</td><td>8.04 ± 0.04</td></tr></tbody></table>
<figure><img src="image_16.png" /><figcaption>**Figure D1.** Similar to Figs 3 and 4 but now for the SST23 $R_{23}$ (top left), $R_3$ (top right), $R_2$ (bottom left), and $O_{32}$ (bottom right) emission line metallicities.</figcaption></figure>

<footnote n="1">¹Department of Physics, University of Bath, Claverton Down, Bath BA2 7AY, UK</footnote>

<footnote n="2">²Centre for Astrophysics Research, University of Hertfordshire, Hatfield, AL10 9AB, UK</footnote>

<footnote n="3">³Cosmic Dawn Center (DAWN), University of Copenhagen, 2200 Copenhagen N, Denmark</footnote>

<footnote n="4">⁴Niels Bohr Institute, University of Copenhagen, Jagtvej 128, DK-2200 Copenhagen N, Denmark</footnote>

<footnote n="5">⁵European Southern Observatory, Karl-Schwarzschild Str. 2, D-85748 Garching bei München, Germany</footnote>

<footnote n="6">⁶Department of Astronomy, University of Geneva, Chemin Pegasi 51, CH-1290 Versoix, Switzerland</footnote>

<footnote n="7">⁷INAF - Osservatorio di Astrofisica e Scienza dello Spazio, Via Piero Gobetti 93/3, I-40129 Bologna, Italy</footnote>

<footnote n="8">⁸Space Science Data Center (SSDC) - Agenzia Spaziale Italiana (ASI), I-00133 Roma, Italy</footnote>

<footnote n="9">⁹INAF - Osservatorio Astronomico di Roma, Via Frascati 33, I-00078 Monte Porzio Catone, Italy</footnote>

<footnote n="10">¹⁰Centre for Astrophysics and Cosmology, Science Institute, University of Iceland, Dunhagi 5, 107 Reykjavik, Iceland</footnote>

<footnote n="11">¹¹Department of Physics & Astronomy, University of Utah, Salt Lake City, UT 84112, USA</footnote>

<footnote n="12">¹²Department of Astrophysics/IMAPP, Radboud University, NL-6525 AJ Nijmegen, the Netherlands</footnote>

<footnote n="13">¹³Istituto Nazionale di Astrofisica (INAF) Istituto di Astrofisica Spaziale e Fisica Cosmica, Via Alfonso Corti 12, I-20133, Milano, Italy</footnote>

<footnote n="14">¹⁴School of Physics and Astronomy, University of Leicester, University Road, Leicester, LE1 7RH, UK</footnote>

<footnote n="15">¹⁵Astronomical Institute, Czech Academy of Sciences, Fričova 298, Ondřejov, Czech Republic</footnote>

<footnote n="16">¹⁶GEPI, Observatoire de Paris, Université PSL, CNRS, 5 Place Jules Janssen, F-92190 Meudon, France</footnote>

<footnote n="17">¹⁷Institut d'Astrophysique de Paris and Sorbonne Université, 98bis Boulevard Arago, F-75014, Paris, France</footnote>

<footnote n="18">¹⁸Excellence Cluster ORIGINS, Boltzmannstraße 2, D-85748 Garching, Germany</footnote>

<footnote n="19">¹⁹Ludwig-Maximilians-Universität, Schellingstraße 4, D-80799 München, Germany</footnote>

<footnote n="20">²⁰Department of Astronomy & Astrophysics, The University of Chicago, 5640 S Ellis Ave., Chicago, IL 60637, USA</footnote>

<footnote n="21">²¹Mathematics, Informatics, Physics and Earth Science Department of Messina University, Papardo campus, Via F. S. D'Alcontres 31, I-98166, Messina, Italy</footnote>

<footnote n="22">²²Space Telescope Science Institute, 3700 San Martin Dr, Baltimore, MD 21218, USA</footnote>

<footnote n="23">²³Instituto de Astrofísica de Andalucía, CSIC, Apartado de correos 3004, E-18080, Granada, Spain</footnote>

<footnote n="24">²⁴School of Physics and Astronomy, University of Birmingham, Birmingham B15 2TT, UK</footnote>

<footnote n="25">²⁵Institute for Gravitational Wave Astronomy, University of Birmingham, Birmingham B15 2TT, UK</footnote>

<footnote n="26">²⁶Clemson University, Department of Physics and Astronomy, Clemson, SC 29634, USA</footnote>

<footnote n="27">²⁷The George Washington University, Department of Physics, 725 21st street NW, Washington DC 20052, USA</footnote>
<sup>28</sup>Astrophysics Research Institute, Liverpool John Moores University, 146 Brownlow Hill, Liverpool L3 5RF, UK

<sup>29</sup>Anton Pannekoek Institute for Astronomy, University of Amsterdam, P.O. Box 94249, NL-1090GE Amsterdam, the Netherlands

<sup>30</sup>Physics Department, University of Calabria, I-87036 Arcavacata di Rende, CS, Italy

<sup>31</sup>JINFN - Laboratori Nazionali di Frascati, Via Enrico Fermi 54, I-00044 Frascati, RM, Italy

<sup>32</sup>INAF, Osservatorio Astronomico di Brera, via E. Bianchi 46, I-23807, Merate, Italy

<sup>33</sup>The Oskar Klein Centre, Department of Physics, Stockholm University, AlbaNova, SE-106 91 Stockholm, Sweden

<sup>34</sup>Artemis, Observatoire de la Côte d'Azur, Université Côte d'Azur, CNRS, F-06304 Nice, France

<sup>35</sup>School of Physics and Astronomy, University of Southampton, Southampton SO17 1BJ, UK

This paper has been typeset from a TEX/LATEX file prepared by the author.