# Non-LTE radiative transfer with Turbospectrum

Jeffrey M. Gerber, Ekaterina Magg, Bertrand Plez, Maria Bergemann, Ulrike Heiter, Terese Olander, Richard Hoppe

► To cite this version:

Jeffrey M. Gerber, Ekaterina Magg, Bertrand Plez, Maria Bergemann, Ulrike Heiter, et al. Non-LTE radiative transfer with Turbospectrum. Astronomy and Astrophysics - A&A, 2023, 669, pp.A43. 10.1051/0004-6361/202243673. [hal-03982519](https://hal.science/hal-03982519)

HAL Id: hal-03982519

https://hal.science/hal-03982519

Submitted on 15 Nov 2023

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>
# Non-LTE Radiative Transfer with Turbospectrum

Jeffrey M. Gerber<fnref n="1" />, Ekaterina Magg<fnref n="1" />, Bertrand Plez², Maria Bergemann<fnref n="1" />, Ulrike Heiter³, Terese Olander³, and Richard Hoppe<fnref n="1" />

¹ Max Planck Institute for Astronomy, 69117, Heidelberg, Germany
e-mail: gerber@mpia.de

² LUPM, Université de Montpellier, CNRS, Montpellier, France

³ Observational Astrophysics, Department of Physics and Astronomy, Uppsala University, Box 516, 751 20 Uppsala, Sweden

Received xxxx; accepted xxxx

## ABSTRACT

Physically realistic models of stellar spectra are needed in a variety of astronomical studies, from the analysis of fundamental stellar parameters, to studies of exoplanets and stellar populations in galaxies. Here we present a new version of the widely-used radiative transfer code Turbospectrum, which we update with the capacity to perform spectrum synthesis for lines of multiple chemical elements in Non-Local Thermodynamic Equilibrium (NLTE). We use the code in the analysis of metallicites and abundances of the Gaia FGK benchmark stars, using one-dimensional MARCS atmospheric models and the averages of 3D radiation-hydrodynamics simulations of stellar surface convection. We show that the new more physically realistic models offer a better description of the observed data and make the program and the associated microphysics data publicly available, including grids of NLTE departure coefficients for H, O, Na, Mg, Si, Ca, Ti, Mn, Fe, Co, Ni, Sr, and Ba.

**Key words.** Radiative transfer - Methods: observational - Techniques: spectroscopic - Sun: abundances - Stars: abundances

## 1. Introduction

Diagnostic stellar spectroscopy is one of the major instruments in modern astrophysical research. With the advent of large-scale stellar surveys, such as Gaia-ESO, APOGEE, SDSS, GALAH, Gaia, 4MOST, and WEAVE, we are entering a new era of precision stellar physics. Large sets of high quality stellar spectra can be exploited to derive direct observational constraints on stellar chemical composition, and therefore on the detailed chemical evolution of stellar populations and the Milky Way Galaxy.

In this study, we focus on the role of physical processes in stellar spectroscopy, in particular on the physics of non-local thermodynamic equilibrium (NLTE) in the determination of stellar metallicities and detailed abundances. Much of the previous work in the field has been carried out under the assumption of local thermodynamic equilibrium (LTE), in which the atomic number densities have been computed using the Saha-Boltzmann formulae from statistical mechanics. However, in the atmospheres of FGKM-type stars, the complex interaction of strong highly non-local radiation fields and the gas particles leads to deviations from LTE. This detailed microphysics can nowadays be modeled using the concept of statistical equilibrium (e.g. Asplund 2005; Mashonkina et al. 2007; Lind et al. 2011; Bergemann et al. 2012b; Amarsi et al. 2016; Semenova et al. 2020; Masseron et al. 2021), in which chemical elements are modelled under the assumption of a trace element, that is including the NLTE effects in the line formation and spectrum synthesis, but ignoring their influence on the energy balance and thus, the thermodynamic structure of stellar atmospheres. This assumption has, so far, been used in all studies, in which NLTE modeling is used to determine abundances for large stellar samples (Kovalev et al. 2019; Buder et al. 2020; Amarsi et al. 2020).

Another concept in classical stellar spectroscopy is the assumption of one-dimensional (1D) geometry and hydrostatic equilibrium (HE). Different families of 1D HE LTE atmospheric models have been computed, including Phoenix (Hauschildt et al. 1999), ATLAS (Kurucz 1979, 2005), MARCS (Gustafsson et al. 2008), and MAFAGS-OS (Grupp 2004a,b). However, despite their general utility and low computational cost, the models offer only an approximate description of stellar atmospheres, as convection and turbulence – critical physical processes in stars with convective envelopes – are replaced by highly-simplified parametrisations (e.g Nordlund et al. 2009; Freytag et al. 2012). Convective energy transport is typically modelled using the mixing-length theory (Böhm-Vitense 1958) and turbulence is represented using the “macro-” and “microturbulence” parameters. The classical 1D HE models have the advantage of including a very detailed account of opacities, although the opacities are still computed in LTE.

The main goal of this paper is to introduce an open-source NLTE version of the widely-used Turbospectrum synthesis code (TS, Alvarez & Plez 1998; Plez 2012)<fnref n="1" />. Our main motivation is to provide a public software that allows the user to generate realistic wide-band synthetic stellar spectra of FGKM-type stars relying on state-of-the-art NLTE model atoms for multiple chemical elements simultaneously and at low computational cost, comparable to standard 1D LTE codes, like MOOG (Sneden 1973) or Synthe (Kurucz 1970). The code can self-consistently handle complex blends, hyperfine structure, isotopic shifts, and enables treatment of very large - multi-million - linelists, including all atoms and tens of molecules. We also provide associated

<footnote n="1">¹ New NLTE version is presented at: https://github.com/bertrandplez/Turbospectrum2020. The previous LTE release 19.1.4 is available at: https://github.com/bertrandplez/Turbospectrum2019.</footnote>
ready-to-use 1D and average 3D model atmospheres in the ap-
propriate format and the grids of NLTE departure coefficients.
The code is conceptually similar to the SIU (Reetz 1991, 1999),
SME (Valenti & Piskunov 1996; Piskunov & Valenti 2017), and
SYNSPEC (Hubeny et al. 2021) codes, which operate, in the
NLTE case, with pre-computed grids of NLTE departure coef-
ficients²³. However, the NLTE versions of the former codes are
not open-source. Also, different from SIU, the NLTE TS code
feeds on a more comprehensive and up-to-date set of background
bound-free and bound-bound opacities. Furthermore, it is supe-
rior to SME in terms of computational efficiency, as a detailed
high-resolution spectrum from 400 to 900 nm of a typical G-
type solar-metallicity star can be computed on timescales of a
few minutes. For example, we were able to generate a 1D NLTE
spectrum of the Sun with this wavelength range and a sampling
of 0.05 Å on a 2.5GHz processor computing roughly 35 mil-
lion atomic and molecular lines in 12 minutes. This model also
included NLTE computations for all 13 elements for which we
have pre-computed departure coefficient grids. The most recent
version of SYNSPEC also offers a capability to calculate NLTE
synthetic spectra, but NLTE is included in lines of H, Ca, and
Mg (Hubeny et al. 2021) only.

The paper is organised as follows. Sect. 2 describes Turbospectrum (hereafter, TS) and the model atmospheres used. We then outline the updates to TS in Sect. 3, comment on the comparison with another radiative transfer code (Sect. 3.1), demonstrate the capability to compute NLTE calculations for multiple elements at once (Sect. 3.2) and the ability to compute 1D and 〈3D〉 NLTE H line profiles (Sect. 3.3). In Sect. 4, we provide an example of the type of abundance analysis that can be done with TS using observations of Gaia benchmark stars as a sample. Finally, we present the results of our example analysis for Fe and Ca in Sect. 5, and we discuss our findings in the context of previous studies in the literature in Sect. 6.

**2. Methodology**

## 2.1. *Model atmospheres*

We make use of two grids of stellar model atmospheres computed for low-mass late-type (FGKM) stars. We use the 1D line-blanketed hydrostatic MARCS models (Gustafsson et al. 2008) and average 3D Stagger models (hereafter, 〈3D〉) from Magic et al. (2013a,b). We briefly describe the models below.

The MARCS<fnref n="4" /> models were computed in LTE, solving the
equation of radiative transfer in plane-parallel geometry for
dwarf models (surface gravity log g[cm s⁻<fnref n="2" />] ≥ 3.0) and in spher-
ical symmetry for giants (log g ≤ 3.5). Convective energy trans-
port is computed in the framework of the mixing-length theory
(Henyey et al. 1965), with the mixing-length coefficient α set to
1.5. Very comprehensive treatment of radiative bound-bound and
bound-free opacities, including all atoms in the first and second
ionisation stages, as well as 519 di- and tri-atomic molecules, are
included in the code. The grid relies on the solar abundance mix-
ture by Grevesse et al. (2007), however, the abundances of oxy-
gen and α-capture-elements are enhanced for models with metal-
licity [Fe/H] ≤ −0.25, reflecting the typical elemental abundance
ratios in stars as a function of metallicity in the solar neighbour-

hood<fnref n="5" />. The parameter space of the MARCS grid is shown in Fig. 1. The grids cover the following range of stellar parameters: T<sub>eff</sub> = 2500, 8000 K with a step of 100 K from 2500 to 4000 K and 250 K from 4000 to 8000 K, log g = 0, 5.5 dex with a step of 0.5 dex, [Fe/H] = -5.0, 1.0 with a step of 1 dex from -5 to -3, 0.5 dex from -3 to -1, and 0.25 dex from -1 to 1 dex. The grids also include three different values for microturbulence at 1, 2, and 5 km/s.

<figure><img src="image_2.png" /><figcaption>Fig. 1: MARCS model atmosphere grid used in this work. PAR-SEC isochrones (Bressan et al. 2012) calculated for [M/H] = -2 and 0 are overplotted as dashed and solid black lines, respectively.</figcaption></figure>

The 〈3D〉 Stagger models were adopted from Magic et al. (2013a,b)<fnref n="6" />. These models were constructed by spatial and temporal averaging of 3D radiation-hydrodynamics (RHD) simulations of stellar surface convection. Specifically, averages were carried out on surfaces of equal optical depth (log τ<sub>5000</sub>). The Stagger code relies on the modified version of the equation of state (EoS) from Mihalas et al. (1988) and abundances were taken from Asplund et al. (2009). For a more detailed description of the input physics and technical aspects, we refer the reader to Magic et al. (2013a,b). Since in these simulations, convection and turbulence are the natural consequence of solving the equations of fluid dynamics coupled with the equation of radiative transfer, there is no need for introducing ad-hoc free parameters, such as the mixing length or “microturbulence” ξᵢ, which directly affects the line opacity. Therefore, we include a depth-dependent velocity profile computed from the original 3D velocity field in the simulation cubes in the form of a microturbulence with a depth-dependent value of one standard deviation of the 3D components as suggested in Uitenbroek & Criscuoli (2011).

It has not been extensively tested yet, whether this approxi-
mation provides the most realistic description of turbulent flows
in stellar atmospheres. For some elements, like Mg (Bergemann
et al. 2017) the <3D> NLTE approach works well, whereas for the
other species like Fe (Amarsi et al. 2016) the differences between
<3D> NLTE and full 3D NLTE are somewhat larger. Nonetheless,
the <3D> model atmosphere approach has an important advan-
tage over standard 1D hydrostatic model atmospheres, in that it

<footnote n="2">² A departure coefficient describes the ratio of the number density of an atom at a given energy level computed in NLTE to that computed in LTE, i.e. using the Saha-Boltzmann equilibrium relations.</footnote>

<footnote n="3">³ SYNSPEC can also work with NLTE populations.</footnote>

<footnote n="4">⁴ https://marcs.astro.uu.se</footnote>

<footnote n="5">⁵ The enhancement is +0.1 for [Fe/H] = −0.25, +0.2 for [Fe/H] = −0.5, +0.3 for [Fe/H] = −0.75, and +0.4 for [Fe/H] ≤ −1.0.</footnote>

<footnote n="6">⁶ https://staggergrid.wordpress.com</footnote>
eliminates two important free parameters (mixing length and $\xi_t$) from the modelling. Therefore and most crucially, our $\langle 3D \rangle$ spectral models are predictive. Especially the classical $\xi_t$ is, numerically, defined as a simple correction to the line opacity, which is commonly either set by hand, or is optimised using some recipes defined by each user. Thus, it is partially degenerate with the abundances of chemical elements. This implies, strictly speaking, that the user has the freedom to influence the resulting chemical abundance estimate obtained by fitting standard 1D HE synthetic spectra to observed data.

Figure 2 compares the structures of the MARCS and $\langle 3D \rangle$ Stagger models by showing temperature as a function of optical depth at 5000 Å (log $\tau_{5000\AA}$) for several model atmospheres representative of low mass dwarfs (effective temperature $T_{\text{eff}}$ = 6000 K, log g = 4.5) and giants ($T_{\text{eff}}$ = 4500 K, log g = 2.0) at low and solar metallicity ([Fe/H] = -2 and 0, respectively). We also show the difference between the MARCS model and the corresponding $\langle 3D \rangle$ Stagger model. As can be seen, the differences between the 1D and $\langle 3D \rangle$ models are in general largest in the interior. In the case of the low metallicity dwarf the outer layers of the atmosphere also show significant differences almost reaching 1000 K.

## 2.2. Turbospectrum

Turbospectrum (Alvarez & Plez 1998; Plez 2012) is an LTE radiative transfer code based on the same methods and input physics as the MARCS model atmosphere code. It uses the Feautrier scheme (Feautrier 1964; Nordlund 1984) to solve the radiative transfer equation including scattering, and works in plane-parallel and spherically symmetric geometry for flux and intensities at various angles. Rayleigh and electron scattering in the continuum is fully taken into account, although we note that this effect is mostly relevant in the atmospheres of extremely metal-poor red giants and it influences only the spectra in the near-UV (Gustafsson et al. 1975; Cayrel et al. 2004; Sobeck et al. 2011). TS uses exactly the same EoS as MARCS with up to four ions of all 92 natural elements, and hundreds of molecules and radicals. Continuous opacities are identical in both codes, and they include bound-free transitions for all major species (H1, H$^-$, He1, C1, Cii, N1, Nii, O1, Oii, Mg1, Mgii, Al1, Alii, Si1, Siii, Ca1, Caii, Fe1, Feii, an approximation for the remaining metals, and CH, OH), free-free transitions for H1, H$^-$, He1, He$^-$, C1, Cii, C$^-$, N$^-$, O$^-$, Mg1, Si1, H$^+$, H$^-$, CO$^-$, and H$^2O^-$, collision induced absorption for H1+H$^1$, H$^1+He1$, H$^2+H1$, H$^2+H2$, H$^2+He1$, scattering by electrons, as well as Rayleigh scattering by H1, H$^2$, and He1. References to all the data used are provided in Gustafsson et al. (2008). The H$^-$ opacity was improved in the present version from the original Wishart (1979) to the more recent McLaughlin et al. (2017a,b). For the solar model, the difference in the optical and near infrared is less than 0.5%. Bound-free opacity for NH was also added following Shen et al. (2014) (P.C. Stancil, priv. comm.). Hydrogen bound-free and line opacity is treated using the code of Barklem & Piskunov (2015). Line broadening is included through a Voigt profile resulting from the convolution of the Gaussian microturbulence and thermal broadening profile with the natural and collisional broadening Lorentz profile. Broadening caused by elastic hydrogen collisions is treated with the so-called 'ABO' (Anstee, Barklem, O'Mara) theory (Anstee & O'Mara 1995; Barklem & O'Mara 1997; Barklem et al. 2000). Electron (linear Stark) collisional broadening has also been added in the present version.

The NLTE version of TS uses grids of NLTE departure coefficients to compute NLTE line profiles. This is done by correcting the line opacity and the line source functions of all lines, similar to other spectrum synthesis and abundance analyses codes, such as SIU and SME. The NLTE extinction coefficient is obtained from the LTE value $\alpha_{\lambda}^*$ using:

$$ \alpha_{\lambda} = \alpha_{\lambda}^{*} b_{l} \frac{1 - \frac{b_{\mu}}{b_{l}} e^{-h\nu/kT}}{1 - e^{-h\nu/kT}}, \qquad (1) $$

where $b_{\mu}$ and $b_{l}$ are the departure coefficients for the upper and lower levels, respectively, the other symbols having their usual meaning. The emissivity of a line is given by

$$ j_{\lambda} = \alpha_{\lambda} B_{\lambda} = \alpha_{\lambda}^{*} b_{\mu} B_{\lambda}, \qquad (2) $$

where $B_{\lambda}$ is the Planck function, and the source function at a given wavelength is obtained by summing the emissivity from the continuum and all contributing lines:

$$ S_{\lambda} = \frac{\sum j_{\lambda}}{\sum \alpha_{\lambda}}. \qquad (3) $$

For the elements that are computed in LTE, the standard Saha-Boltzmann distribution functions are used.

TS can compute large chunks of spectra, including lines from all species, some elements in LTE, others in NLTE, allowing the treatment of blends. The elements to be calculated in NLTE are handled by the user via a dedicated input file. A new feature allows to specify a list of spectral windows to be calculated, reducing computing time and the size of the output. There is no provision for taking into account departures from LTE for the continuum opacities yet, but we do not expect any significant differences associated with this approximation in the optical and near-IR wavelength ranges, which are typically used as diagnostics in stellar spectroscopy. Haberreiter et al. (2008) show that using NLTE opacity distribution functions in the calculations of the solar model atmosphere has a significant effect only at wavelengths shorter than 260 nm (UV). Young & Short (2014) investigated NLTE model atmospheres for red giants. Also their work shows that NLTE effects influence the spectral energy distribution in stars with $T_{\text{eff}} \ge 4000$ K only below 400 nm.

## 2.3. Line list

Concerning atomic and molecular data, we make use of the Gaia-ESO line list (Heiter et al. 2021), which covers the wavelength ranges from 475 to 685 nm and from 850 to 895 nm. The atomic part of the line list is mainly based on experimental data supplemented by the most reliable theoretical data (see Heiter et al. 2021 for a detailed description of the data sources). For the wavelength ranges not covered by the Gaia-ESO line list, we use data from the VALD database<fnref n="7" /> (Piskunov et al. 1995; Ryabchikova et al. 2015). It is important to note that the line list was not calibrated on any observational data, which is sometimes done in the literature (e.g., Smith et al. 2021) and therefore it is not tied to any particular type of star or stellar model, which makes it universally applicable to any object in the entire parameter space of cool stars.

<footnote n="7">⁷ http://vald.astro.uu.se</footnote>
<figure><img src="image_3.png" /><figcaption>Fig. 2: The top two panels show temperature as a function of optical depth at 5000 Å for model atmospheres of four types of stars. The open (giant stars) and solid (dwarf stars) black circles and squares show the MARCS model atmospheres for the parameters given in the legend (low metallicity to the left, solar metallicity to the right). The corresponding (3D) Stagger models are shown as cyan dots. The bottom two panels show the difference between the MARCS model and the (3D) Stagger model for each case following the same convention for open and solid circles or squares as in the top panels.</figcaption></figure>

## 2.4. Statistical equilibrium

The grids of departure coefficients were computed using the 1D NLTE radiative transfer solver MULTI (Carlsson 1986) updated as described in Bergemann et al. (2019) and Gallagher et al. (2020). Statistical equilibrium of a NLTE element in MULTI is computed under the standard assumption of a trace element, that is assuming that deviations from LTE do not influence the structure of the input model atmosphere.

The departure grids were computed for 13 chemical elements, namely H, O, Na, Mg, Si, Ca, Ti, Mn, Fe, Co, Ni, Sr, and Ba. The NLTE model atoms were taken from the following studies:

- H: Mashonkina et al. (2008)

- O: Bergemann et al. (2021)

- Na: Larsen et al. (2021),

- Mg: Bergemann et al. (2017)

- Si: Bergemann et al. (2013) with Si+H collisional data from Belyaev et al. (2014) and updates to the radiative data as described in Magg et al. (2022)

- Ca: Mashonkina et al. (2007), updates described in Semenova et al. (2020)

- Ti: Bergemann (2011)

- Mn: Bergemann et al. (2019)

- Fe: Bergemann et al. (2012b), updates described in Semenova et al. (2020)

- Co: Bergemann et al. (2010) with Co+H collisional data from Yakovleva et al. (2020)

- Ni: Bergemann et al. (2021) with Ni+H collisional data from Voronov et al. (2022)

- Sr: Bergemann et al. (2012a) with Sr+H collisional data from Gallagher et al. in prep

- Ba: Gallagher et al. (2020)

For Fe, we solved the radiative transfer and statistical equilibrium equations for each metallicity ([Fe/H]) point in the MARCS and STAGGER model grids. For all other chemical elements, we solved the same equations varying the element abundance within [-2, +1] dex in abundance steps of 0.1 dex relative to the corresponding solar ratio [X/Fe] (is always zero by definition). The grid of NLTE departure coefficients is available for each of the 12 chemical elements, described above.<fnref n="8" />

The NLTE grids of departures were computed for each model atmosphere in the MARCS and STAGGER grids (as described in Sect. 2.1) and are supplied with the public release of the code. We recommend to use the model atmosphere grids supplied with the grids of departure coefficients, because we also provide a dedicated interpolating function (based on the Fortran code by Thomas Masseron, see also Gustafsson et al. 2008) that takes the rectangular grids of model atmosphere and the corresponding grids of departures coefficients and produces an inter-

<footnote n="8">⁸ The current grids of departure coefficients can be found at https://keeper.mpd1.mpg.de/d/9b6c265057aa4bceb939/.</footnote>
<table><caption>Table 1: The average percent difference between TS and MULTI calculation of the ratio of NLTE to LTE equivalent width of nine Ca lines computed for four different sets of parameters. For all results, MARCS model atmospheres were used. For the following table, $R_{NLTE} = EW_{NLTE}/EW_{LTE}$.</caption><thead><tr><th>T<sub>eff</sub></th><th>log g</th><th>[Fe/H]</th><th>R<sub>NLTE</sub> (TS) - R<sub>NLTE</sub> (MULTI) (in %)</th></tr></thead><tbody><tr><td>6000</td><td>4.5</td><td>0.0</td><td>0.10</td></tr><tr><td>6000</td><td>4.5</td><td>-2.0</td><td>0.10</td></tr><tr><td>4500</td><td>2.0</td><td>0.0</td><td>0.03</td></tr><tr><td>4500</td><td>2.0</td><td>-2.0</td><td>0.05</td></tr></tbody></table>

polated atmosphere structure and departure file for any desired combination of stellar parameters. We adjusted this module to also interpolate the grid of departure coefficients in 4 dimensions: $T_{eff}$, log g, [Fe/H], and elemental abundances. We also have created a new module that provides the same function for model atmospheres formatted for use with MULTI to handle the interpolation of the 〈3D〉 models from STAGGER.<fnref n="9" />

# 3. New capabilities of Turbospectrum

## 3.1. Comparison with NLTE calculations from MULTI

We tested our method for calculating NLTE line profiles using TS by generating NLTE model spectra using the MULTI code, and by comparing the equivalent widths (EWs) of various Ca lines. MULTI is the code that we use to calculate the NLTE statistical equilibrium and NLTE grids of departures, and so it provides the most self-consistent anchor point for our TS results. The same four sets of atmospheric parameters as in Fig. 2 were taken from grid points of the MARCS model atmosphere grid and chosen as test cases to represent giant and dwarf stars at solar and low metallicity. As mentioned previously, the giant stars were given an effective temperature of 4000 K and a surface gravity of log g = 2.0, and the dwarfs were given an effective temperature of 6000 K and a surface gravity of log g = 4.5. Our low metallicity model used an [Fe/H] of -2.0 dex.

The results of this test for each of the model spectra are shown in Table 1. Direct comparisons of NLTE EWs are not useful, because small discrepancies may arise due to other differences between the two codes in, e.g., equation of state, background opacities, or radiative transfer solvers and angle quadrature. We therefore calculated with each code the ratio of NLTE to LTE EWs for a given set of Ca lines. Ca was chosen as the element, for which the NLTE abundance corrections show a large dynamic range, being positive for some lines and negative for the others. The average percent difference of the ratio of EWs (EW<sub>NLTE</sub>/EW<sub>LTE</sub>) computed with MULTI and TS is given in the final column of the table. All lines show a difference below 0.5%, with the average being below 0.1%, showing that the TS predicts correct NLTE effects in spectral lines.

We do not detect any systematic bias against the atomic properties of the transition, the lower and upper level excitation potential, oscillator strength, or wavelength. Also there is no evidence that either of the codes systematically over- or underestimates the line EWs. A similar test was performed for Fe lines, confirming our results for Ca. Therefore, we conclude that our method for calculating NLTE line profiles with TS is robust.

## 3.2. NLTE calculations with multiple elements

The main novelty of the new TS is that it can compute NLTE spectra, treating multiple elements in NLTE at the same time. Computing multiple elements in NLTE is crucial for studies that want to consider blended lines for abundance determination or study large regions of spectra where NLTE contributions to multiple elements are important.

To test and showcase this capability, we generated spectra with 〈3D〉 NLTE line profiles for H, O, Mg, Ca, Mn, and Fe for all four test cases that we used to compare our NLTE calculations with MULTI, and compared them to spectra generated using 1D LTE. The model spectra were then convolved to a resolution of $R = \lambda/\Delta\lambda \sim 20\,000$ to demonstrate how the differences between the two models would appear at a resolution similar to those used for future surveys such as WEAVE and 4MOST. Figure 3 shows these two spectra for comparison in a window centered on 5190 Å. There are several areas where the 1D LTE model differs significantly from the 〈3D〉 NLTE model.

## 3.3. H line profiles

The new version of TS also has the ability to calculate H line profiles using NLTE. The wings of $H\alpha$ are arguably the most sensitive and powerful spectroscopic diagnostics of effective temperature for dwarf stars (e.g. Fuhrmann et al. 1993, 1994; Grupp 2004a,b). It is therefore important to compare the H line profiles generated with NLTE physics with LTE profiles and observations.

Figure 4 shows the simulated 〈3D〉 NLTE and 1D LTE $H\alpha$ lines, respectively, compared to the observed spectra for the Sun, Procyon, HD 84937, and HD 140283. The model lines were calculated using independent stellar parameters for these targets, obtained using non-spectroscopic diagnostics (see Sect. 4.1).

Clearly, the 〈3D〉 NLTE models provide an excellent fit to the $H\alpha$ wings that support previous studies of H lines in the literature (Amarsi et al. 2018). In contrast, the 1D LTE models fail to reproduce the wings, leading to a systematic under-estimation when using the line to derive $T_{eff}$. The line cores cannot be described even in 〈3D〉 NLTE. This is not a concern in this work, because it is well known that the Balmer line cores are formed in chromospheres, and so require magneto-hydrodynamical modelling and Non-LTE for a self-consistent description (Leenaarts et al. 2012; Bergemann et al. 2016).

# 4. Example abundance analysis with NLTE Turbospectrum

## 4.1. Observational data

Our observational sample is drawn from the Gaia FGK benchmark star sample (Jofré et al. 2018), and we refer the readers to Jofré et al. (2014) and Heiter et al. (2015) for the details on the methods used for the determination of the atmospheric parameters and abundances. In short, the sample comprises 31 FGK-type stars covering a broad range of $T_{eff}$, log g, and [Fe/H] and it includes main-sequence dwarfs, turn-off stars, subgiants, and red giants. For all of these stars, spectra collected with the UVES and HARPS spectrographs at the ESO Very Large Telescope (VLT) and the La Silla 3.6m telescope are available and we make use of these data in this work. The typical signal-to-noise ratio of the data exceeds 1000, and the resolving power is $R = 47\,000$ for UVES and $R = 115\,000$ for the HARPS data. The spectra cover a broad wavelength range of 480 to 680 nm (UVES) and 378

<footnote n="9">⁹ The code to simultaneously interpolate model atmospheres and departure coefficient grids is included on the TS Github.</footnote>
<figure><img src="image_4.png" /><figcaption>Fig. 3: Synthetic spectrum computed with a <3D> Stagger model atmosphere in NLTE, compared with a spectrum calculated in 1D LTE. The stellar parameters used in the calculations are indicated in the figure inset.</figcaption></figure>

to 691 nm (HARPS). For more details on the spectra and their reduction, including the continuum normalisation, we refer the reader to Blanco-Cuaresma et al. (2014).

We adopt the reference stellar parameters for these stars from Jofré et al. (2018), with a few updates as described in Gent et al. (2022). The $T_{\text{eff}}$ estimates for the majority of the stars are based on angular diameters determined from interferometric data collected with several different facilities, such as CHARA or the VLTI, together with bolometric flux estimates. For a few stars the angular diameters were determined from surface-brightness relations using ($B-K$) and ($V-K$) colour indices or from infrared photometry (Heiter et al. 2015, Sect. 3). The surface gravities were determined using angular diameters, Hipparcos parallaxes<fnref n="10" />, and masses estimated from evolutionary tracks (Heiter et al. 2015, Sect. 4). For the stars in the sample which have asteroseismic data it was verified that the surface gravities determined from the angular diameters agree with those calculated from the frequency of maximum power and the $T_{\text{eff}}$ values (Heiter et al. 2015, Sect. 5.3). Metallicities and microturbulence estimates were determined by fitting Fe line profiles or equivalent widths in LTE using MARCS models and several different radiative transfer codes and applying NLTE corrections to the resulting Fe line abundances (Jofré et al. 2014). For some of the stars (Procyon, HD 122563, HD 140283) more accurate metallicities computed using a full 3D NLTE approach became available recently (Amarsi et al. 2016). Therefore, we also use 3D NLTE [Fe/H] values, where possible.

## 4.2. Fitting stellar parameters with Turbospectrum

For this work, we developed a Python module that wraps NLTE TS, which can be used to directly determine stellar parameters, including $T_{\text{eff}}$, log g, [Fe/H], $\xi_t$, $V_{\text{mac}}$, abundances, etc, from the observed stellar spectrum. That is, TS can be used to not only generate synthetic grids, but also as a standalone code to perform spectrum synthesis and stellar parameter diagnostics. This method allows us to instantly update the macro- and microphysics (atomic and molecular data) of our models and seamlessly switch between 1D NLTE, 1D LTE, (3D) LTE, or (3D) NLTE between runs without any overhead. This also allows us to directly investigate the quality of the spectral line fits and enhances the flexibility of the analysis, as the abundance of any chemical element in the periodic table can be determined directly, provided a suitable line list exists.

We use the Nelder-Mead numerical method (also known as the simplex method) to fit a set of observed lines within a pre-defined spectral range with a model spectrum. The line choice is controlled by a set of user-defined line and continuum masks. The Nelder-Mead method uses a simplex to test $n+1$ points in an $n$-dimensional space until the minimum of a function consisting of $n$ dimensions is found. We apply this method to a given set of spectral windows centered on spectral features of the element under consideration. The element abundance, a radial velocity shift, and - if needed - other parameters (like microturbulence) are simultaneously adjusted until the $\chi^2$ value is minimized and a solution to both parameters is determined. The selection of diagnostic lines is described in Sect. 2.3.

For fitting multiple lines at a time in a single spectrum, we find that the precision of our abundances is improved by setting the microturbulence based on an empirical relation related to the

<footnote n="10">¹⁰ The Hipparcos parallaxes are consistent with Gaia DR2 and Gaia eDR3 values for these stars.</footnote>
<figure><img src="image_5.png" /><figcaption>Fig. 4: The Hα line profiles of the Sun, Procyon, HD 84937, and HD 140283. The black lines are observations made by UVES. The red and cyan lines are the 1D LTE and 〈3D〉 NLTE model profiles, respectively, generated with Turbospectrum. Inset in the lower right corner of each panel is a zoomed in look at the core of each line.</figcaption></figure>

stellar parameters of the star being fit (see Buder et al. 2021, and references therein for a description of the relation used). We also adopt a macroturbulence value of 3.5 km/s for all stars in the sample and apply a broadening correction to the synthetic spectra to get line profiles that better match the observed spectra. Our Python module used to conduct the fitting handles the convolution of synthetic spectra automatically.

In Fig. 5, we show <3D> NLTE and 1D LTE profiles of selected Fe I lines. Both models use the same input parameters and input Fe abundance, the fit being optimized for the NLTE case. The quality of the fit is very good, suggesting that the new approach can be used for a robust spectrum synthesis in the parameter space described by our input models.

Our Python wrapper used for fitting can be found at the following Github page https://github.com/JGerbs13/TSFitPy. It makes use of the model interpolator mentioned in Section 2.4 and the latest version of TS, both of which can be found on the main TS Github page. In addition to our fitting module, we also include a script that can be used to run the

model interpolator and generate a synthetic spectrum with TS for a given set of stellar parameters.

# 5. Abundance results

## 5.1. Metallicity

Figure 6 shows the differences between NLTE and LTE abundances of Fe I lines for two example stars in the sample. The atomic parameters of Fe I lines used for these fits are given in Table 2. The abundances were computed using 1D LTE, 1D NLTE, 〈3D〉 LTE, and 〈3D〉 NLTE. These figures confirm that the 1D LTE and 〈3D〉 LTE models generally under-estimate the abundances derived from the lines of neutral species, similar to other findings in the literature (Bergemann et al. 2012b; Amarsi et al. 2016; Sitnova et al. 2016; Lind et al. 2017; Bergemann et al. 2019). We find no trend with the line EW, other than the fact that weak lines (especially those with EW < 5 mA) show a higher spread in abundance for the same star than strong lines, as expected. Similarly, there is no clear trend in abundance with lines arising from different energy levels. However, there does appear
<figure><img src="image_6.png" /><figcaption>Fig. 5: Normalized flux vs. wavelength for four sample Fe I lines in an observed solar spectrum together with model fits. Observations are shown as black circles, 1D LTE model fits are shown as red lines, and (3D) NLTE model fits are shown as cyan lines. Residuals for the 1D LTE and (3D) NLTE model fits are shown as red and cyan points, respectively. The points have been shifted by 0.1 and are plotted above each spectrum with a dashed line to indicate the zero point at 1.1.</figcaption></figure>

to be a trend in the difference between NLTE and LTE abundance with the excitation potential for (3D) models. As seen in Figure 6, lines with higher excitation potential tend to have a lower $\Delta$(NLTE - LTE). This is consistent with the results by Bergemann et al. (2012b) and Amarsi et al. (2016), who found the same trends in their analyses of Fe lines in FGK-type stars.

Figure 7 shows the differences between 1D NLTE and (3D) NLTE abundances and the 1D LTE results. We note that the available (3D) model atmosphere grid is limited in terms of the $T_{\text{eff}}$-log g coverage, therefore, in the attempt to avoid extrapolation, we could not determine Fe abundances for selected types of stars (very cool red giants and red supergiants). The differences are systematic, which simply reflects the smooth and regular behaviour of NLTE effects with the $T_{\text{eff}}$, log g, and [Fe/H] of the star. As shown in previous work (Bergemann et al. 2012b; Bergemann & Nordlander 2014), NLTE effects on Fe I lines grow with increasing $T_{\text{eff}}$, and decreasing surface gravity and metallicity. In hotter or more metal-poor stars, the more intense UV radiation field enhances over-ionisation, which is the main driver

of NLTE effects in neutral species with large photo-ionisation cross-sections and low ionisation potentials. In lower log g stars (lower densities), larger NLTE effects are rather caused by less efficient collisional thermalisation. For most stars we find an average difference of about +0.05 dex between the [Fe/H] determined using 1D NLTE and 1D LTE. When (3D) model atmospheres are used (Figure 7, bottom panel), the differences for the stars in our sample fall between 0.00 and +0.15 dex with lower metallicity stars showing the largest differences. This value for the overall difference and slight trend with metallicity agrees well with differences expected by model calculations (Bergemann et al. 2012b; Amarsi et al. 2016; Semenova et al. 2020).

Figure 8 shows the final (3D) NLTE or 1D NLTE metallicities determined by minimizing the total $\chi^2$ of all Fe lines. The values are compared to the 1D NLTE values from Jofré et al. (2018). Generally, we find that the metallicities are in good agreement with those in the literature within the uncertainties, with no systematic offsets between stars observed with either instrument (HARPS or UVES). We emphasize, however, that there
<figure><img src="image_7.png" /></figure>

Fig. 6: Each panel shows the difference between the line abundances derived from a NLTE and an LTE fit for both 〈3D〉 (Stagger) and MARCS model atmospheres for various Fe I lines for HD 84937 and HD 140283 as a function of excitation potential of the line. Fits using MARCS model atmospheres are shown as red squares and those using 〈3D〉 model atmospheres are shown as black circles. The differences are given in units of dex.

is no direct model-independent method to derive abundances, which is why accuracy cannot be tested this way. Our approach, using 〈3D〉 model atmospheres, is physically more realistic compared to Jofré et al. (2018), therefore differences in results are expected. For the Sun, we obtain a 〈3D〉 NLTE iron abundance of log A(Fe) = 7.50, which is consistent within the uncertainty with the 3D NLTE estimate by Lind et al. (2017) and Magg et al. (2022). Minor differences are expected not only because of methodological differences (〈3D〉 NLTE vs 3D NLTE, different line selection), but also because solar intensities, rather than fluxes, were used in Lind et al. (2017). Our 1D LTE, 1D NLTE, and 〈3D〉 NLTE results are given in Table 3.

## 5.2. Ca abundances

In addition to Fe, we derived Ca abundances using the new TS to compare our results with what has been observed in the literature. Ca was chosen, because, in contrast to Fe, the lines of Ca I show pronounced negative NLTE effects. We studied abundances for each individual line given in Table 5 of the same stars for which we conducted an individual line analysis for Fe by minimizing the $\chi^2$ value for each line individually in our fitting procedure. Figure 9 shows the difference between the NLTE and LTE abundances as a function of EW of a given line for the Sun and Procyon for both MARCS and average Stagger model atmospheres. We chose to present the abundances as a function of EW instead of excitation potential as done in the previous section, because these lines all had excitation potentials between 1.8 and 3 eV, with most lines having an excitation potential ~2.5 eV. In general, we find that NLTE abundances are lower than LTE for both 1D and 〈3D〉 model atmospheres. This result is similar to what was observed by Mashonkina et al. (2017) for the same lines as the ones we used. We also find a correlation with EW for the LTE abundance fits as the abundances of lines with EW > 75 mÅ increase with increasing EW. We do not find the same correlation in the NLTE fits. The same correlation for LTE fits was also observed by Mashonkina et al. (2017) in their measurements of Procyon. This behavior explains the trend observed in

the Δ(NLTE - LTE) versus EW diagram for Procyon (Fig. 9, right panel), where the difference becomes more negative with increasing EW especially for EW ≥ 100 mÅ.

For the remaining stars in the sample, we calculated Ca abundances by minimizing the $\chi^2$ for all Ca lines at once similar to what was done for Fe. We used the effective temperature and surface gravity from the literature (and given in Table 3) and our final [Fe/H] value from the previous section. For simplicity, we use the 〈3D〉 NLTE [Fe/H] value for all Ca fits where available, and the 1D NLTE [Fe/H] value for the cases where we were not able to interpolate a 〈3D〉 model as described in the previous section. Our Ca abundance results for the sample of Gaia benchmark stars are shown in Table 6. We also analyzed the difference between NLTE and LTE fits to compare with what has been modeled and determined in the literature. We find that the NLTE Ca abundance for both 1D and 〈3D〉 is ~0.1 dex less than the LTE 1D fit with differences ranging from 0.0 dex to roughly -0.2 dex as shown in Figure 10. For stars with low metallicity ([Fe/H] ~ -2.0), the difference is very small and close to zero for most stars in the sample. The smaller difference in these stars is likely due to the mentioned LTE abundance trend with EW. Since the low metallicity stars do not have lines stronger than 100 mÅ, the LTE Ca abundances are not skewed towards stronger values by these lines, which means the results are closer to the NLTE abundances. Our differences between the 1D LTE, 〈3D〉 LTE, 1D NLTE, and 〈3D〉 NLTE Ca abundance determinations are shown fully in Table 6.

## 6. Discussion and conclusions

We have presented a new version of Turbospectrum capable of handling computations of synthetic spectra using NLTE physics. This new capability plus the existing capability for Turbospectrum to handle 〈3D〉 model atmospheres means that Turbospectrum can now be used to compute model spectra in 1D LTE, 1D NLTE, 〈3D〉 LTE, and 〈3D〉 NLTE. We compared the calculation of equivalent widths of Ca line profiles in NLTE using Turbospectrum to a similar calculation using MULTI (a code
<table><caption>Table 2: Fe I lines used for fitting.</caption><thead><tr><th>λ (Å)</th><th>E<sub>low</sub> (eV)</th><th>log gf</th><th>vdW<sup>a</sup></th><th>Ref.<sup>b</sup></th></tr></thead><tbody><tr><td>5141.739</td><td>2.424</td><td>-1.978</td><td>367.251</td><td>1</td></tr><tr><td>5217.389</td><td>3.211</td><td>-1.074</td><td>815.232</td><td>2</td></tr><tr><td>5242.491</td><td>3.634</td><td>-0.967</td><td>361.248</td><td>3</td></tr><tr><td>5324.179</td><td>3.211</td><td>-0.108</td><td>791.236</td><td>4</td></tr><tr><td>5364.871</td><td>4.446</td><td>0.228</td><td>1013.281</td><td>3</td></tr><tr><td>5365.399</td><td>3.573</td><td>-1.020</td><td>283.261</td><td>3</td></tr><tr><td>5367.466</td><td>4.415</td><td>0.444</td><td>972.280</td><td>5</td></tr><tr><td>5379.574</td><td>3.695</td><td>-1.514</td><td>363.249</td><td>3</td></tr><tr><td>5383.369</td><td>4.313</td><td>0.645</td><td>836.278</td><td>3</td></tr><tr><td>5398.279</td><td>4.446</td><td>-0.630</td><td>993.280</td><td>6</td></tr><tr><td>5415.199</td><td>4.387</td><td>0.643</td><td>910.279</td><td>3</td></tr><tr><td>5445.042</td><td>4.387</td><td>-0.020</td><td>895.279</td><td>7</td></tr><tr><td>5501.465</td><td>0.958</td><td>-3.046</td><td>239.249</td><td>3</td></tr><tr><td>5506.779</td><td>0.990</td><td>-2.795</td><td>241.248</td><td>8</td></tr><tr><td>5543.936</td><td>4.218</td><td>-1.040</td><td>742.238</td><td>6</td></tr><tr><td>5560.211</td><td>4.435</td><td>-1.090</td><td>895.278</td><td>6</td></tr><tr><td>5569.618</td><td>3.417</td><td>-0.517</td><td>848.233</td><td>9</td></tr><tr><td>5576.089</td><td>3.430</td><td>-0.900</td><td>854.232</td><td>6</td></tr><tr><td>5638.262</td><td>4.220</td><td>-0.720</td><td>730.235</td><td>10</td></tr><tr><td>5661.345</td><td>4.284</td><td>-1.765</td><td>765.209</td><td>11</td></tr><tr><td>5679.023</td><td>4.652</td><td>-0.820</td><td>1106.291</td><td>6</td></tr><tr><td>5731.762</td><td>4.256</td><td>-1.200</td><td>727.232</td><td>6</td></tr><tr><td>5741.848</td><td>4.256</td><td>-1.672</td><td>725.232</td><td>3</td></tr><tr><td>5855.076</td><td>4.608</td><td>-1.478</td><td>962.279</td><td>11</td></tr><tr><td>5883.816</td><td>3.960</td><td>-1.260</td><td>998.250</td><td>6</td></tr><tr><td>5905.671</td><td>4.652</td><td>-0.690</td><td>994.282</td><td>6</td></tr><tr><td>5930.180</td><td>4.652</td><td>-0.230</td><td>983.281</td><td>12</td></tr><tr><td>5956.694</td><td>0.859</td><td>-4.599</td><td>227.252</td><td>13</td></tr><tr><td>6024.058</td><td>4.549</td><td>-0.120</td><td>823.275</td><td>12</td></tr><tr><td>6027.051</td><td>4.076</td><td>-1.089</td><td>380.250</td><td>3</td></tr><tr><td>6056.004</td><td>4.733</td><td>-0.320</td><td>1029.286</td><td>10</td></tr><tr><td>6093.643</td><td>4.608</td><td>-1.400</td><td>866.274</td><td>6</td></tr><tr><td>6151.617</td><td>2.176</td><td>-3.295</td><td>277.263</td><td>14</td></tr><tr><td>6165.360</td><td>4.143</td><td>-1.473</td><td>380.250</td><td>3</td></tr><tr><td>6173.334</td><td>2.223</td><td>-2.880</td><td>281.266</td><td>15</td></tr><tr><td>6187.989</td><td>3.943</td><td>-1.620</td><td>903.244</td><td>6</td></tr><tr><td>6219.280</td><td>2.198</td><td>-2.432</td><td>278.264</td><td>14</td></tr><tr><td>6246.318</td><td>3.603</td><td>-0.771</td><td>820.246</td><td>2</td></tr><tr><td>6252.555</td><td>2.404</td><td>-1.699</td><td>326.245</td><td>16</td></tr><tr><td>6265.132</td><td>2.176</td><td>-2.550</td><td>274.261</td><td>16</td></tr><tr><td>6270.224</td><td>2.858</td><td>-2.470</td><td>350.249</td><td>1</td></tr><tr><td>6297.792</td><td>2.223</td><td>-2.737</td><td>278.264</td><td>14</td></tr><tr><td>6301.500</td><td>3.654</td><td>-0.720</td><td>832.243</td><td>17</td></tr><tr><td>6322.685</td><td>2.588</td><td>-2.430</td><td>345.238</td><td>18</td></tr><tr><td>6330.848</td><td>4.733</td><td>-1.640</td><td>915.277</td><td>6</td></tr><tr><td>6335.330</td><td>2.198</td><td>-2.177</td><td>275.261</td><td>3</td></tr><tr><td>6336.823</td><td>3.686</td><td>-0.852</td><td>845.240</td><td>9</td></tr><tr><td>6393.601</td><td>2.433</td><td>-1.452</td><td>326.246</td><td>1</td></tr><tr><td>6411.648</td><td>3.654</td><td>-0.596</td><td>820.247</td><td>2</td></tr><tr><td>6430.845</td><td>2.176</td><td>-2.005</td><td>271.257</td><td>16</td></tr><tr><td>6481.870</td><td>2.279</td><td>-2.981</td><td>308.243</td><td>14</td></tr><tr><td>6498.938</td><td>0.958</td><td>-4.687</td><td>226.253</td><td>13</td></tr></tbody></table>

Notes. (a) Van der Waals broadening parameter from Barklem et al. (2000). (b) References for gf-values: (1) average of Bard et al. (1991) and O'Brian et al. (1991) (2) average of Bard et al. (1991), O'Brian et al. (1991), and Den Hartog et al. (2014) (3) O'Brian et al. (1991) (4) average of Bard et al. (1991) and Ruffoni et al. (2014) (5) average of Bard & Kock (1994) and O'Brian et al. (1991) (6) May et al. (1974) (7) Wolnik et al. (1970) renormalized to Fuhr et al. (1988) (8) average of Blackwell et al. (1979) and O'Brian et al. (1991) (9) average of Bard & Kock (1994) and Den Hartog et al. (2014) (10) Ruffoni et al. (2014) (11) Bard & Kock (1994) (12) Wolnik et al. (1971) renormalized to Fuhr et al. (1988) (13) average of Blackwell et al. (1986) and O'Brian et al. (1991) (14) average of Bard et al. (1991), Blackwell et al. (1982a), and O'Brian et al. (1991) (15) Blackwell et al. (1982a) (16) average of Blackwell et al. (1982b) and O'Brian et al. (1991) (17) average of Bard et al. (1991) and O'Brian et al. (1991) (18) average of Blackwell et al. (1982a) and O'Brian et al. (1991)
<table><caption>Table 3: Results for Fe I ([Fe/H] using a solar abundance of log A(Fe) = 7.50).</caption><thead><tr><th rowspan="2">Star name</th><th colspan="2">Adopted →</th><th rowspan="2">Literature<sup>a</sup><br>[Fe/H]</th><th colspan="4">Derived →</th></tr><tr><th>T<sub>eff</sub> [K]</th><th>log g [cms<sup>-2</sup>]</th><th>1D LTE</th><th>1D NLTE</th><th>⟨3D⟩ LTE</th><th>⟨3D⟩ NLTE</th></tr></thead><tbody><tr><td>18Sco</td><td>5810</td><td>4.44</td><td>0.03</td><td>-0.01</td><td>0.03</td><td>0.02</td><td>0.07</td></tr><tr><td>Arcturus</td><td>4286</td><td>1.60</td><td>-0.52</td><td>-0.67</td><td>-0.63</td><td>...</td><td>...</td></tr><tr><td>μ Ara</td><td>5902</td><td>4.30</td><td>0.35</td><td>0.27</td><td>0.34</td><td>0.31</td><td>0.33</td></tr><tr><td>η Boo</td><td>6099</td><td>3.79</td><td>0.32</td><td>0.16</td><td>0.23</td><td>...</td><td>...</td></tr><tr><td>α CenA</td><td>5792</td><td>4.31</td><td>0.26</td><td>0.13</td><td>0.19</td><td>0.17</td><td>0.20</td></tr><tr><td>α CenB</td><td>5231</td><td>4.53</td><td>0.22</td><td>0.20</td><td>0.25</td><td>0.30</td><td>0.32</td></tr><tr><td>τ Cet</td><td>5414</td><td>4.49</td><td>-0.49</td><td>-0.47</td><td>-0.42</td><td>-0.42</td><td>-0.38</td></tr><tr><td>δ Eri</td><td>4954</td><td>3.76</td><td>0.06</td><td>-0.02</td><td>0.02</td><td>0.00</td><td>0.03</td></tr><tr><td>ε Eri</td><td>5076</td><td>4.61</td><td>-0.09</td><td>-0.11</td><td>-0.08</td><td>-0.08</td><td>-0.06</td></tr><tr><td>ε For</td><td>5123</td><td>3.45</td><td>-0.60</td><td>-0.61</td><td>-0.57</td><td>-0.65</td><td>-0.60</td></tr><tr><td>β Gem</td><td>4858</td><td>2.90</td><td>0.13</td><td>-0.04</td><td>0.03</td><td>...</td><td>...</td></tr><tr><td>ξ Hya</td><td>5044</td><td>2.87</td><td>0.16</td><td>-0.04</td><td>0.06</td><td>...</td><td>...</td></tr><tr><td>β Hyi</td><td>5873</td><td>3.98</td><td>-0.04</td><td>-0.24</td><td>-0.18</td><td>-0.22</td><td>-0.19</td></tr><tr><td>Procyon</td><td>6554</td><td>4.00</td><td>0.01</td><td>-0.24</td><td>-0.19</td><td>...</td><td>...</td></tr><tr><td>α Tau</td><td>3927</td><td>1.11</td><td>-0.37</td><td>-0.20</td><td>-0.36</td><td>...</td><td>...</td></tr><tr><td>β Vir</td><td>6083</td><td>4.10</td><td>0.24</td><td>0.00</td><td>0.05</td><td>-0.02</td><td>0.03</td></tr><tr><td>ε Vir</td><td>4983</td><td>2.77</td><td>0.15</td><td>-0.05</td><td>0.05</td><td>...</td><td>...</td></tr><tr><td>HD22879</td><td>5868</td><td>4.27</td><td>-0.86</td><td>-0.90</td><td>-0.85</td><td>-0.95</td><td>-0.86</td></tr><tr><td>HD49933</td><td>6635</td><td>4.20</td><td>-0.41</td><td>-0.54</td><td>-0.48</td><td>...</td><td>...</td></tr><tr><td>HD84937</td><td>6356</td><td>4.06</td><td>-2.03</td><td>-2.37</td><td>-2.32</td><td>-2.32</td><td>-2.25</td></tr><tr><td>HD102200</td><td>6155</td><td>4.22</td><td>-1.12</td><td>-1.31</td><td>-1.27</td><td>-1.34</td><td>-1.26</td></tr><tr><td>HD106038</td><td>6121</td><td>4.55</td><td>-1.25</td><td>-1.46</td><td>-1.41</td><td>...</td><td>...</td></tr><tr><td>HD107328</td><td>4496</td><td>2.09</td><td>-0.33</td><td>-0.39</td><td>-0.33</td><td>...</td><td>...</td></tr><tr><td>HD122563</td><td>4635</td><td>1.40</td><td>-2.75</td><td>-2.84</td><td>-2.53</td><td>...</td><td>...</td></tr><tr><td>HD140283</td><td>5792</td><td>3.65</td><td>-2.29</td><td>-2.58</td><td>-2.50</td><td>-2.59</td><td>-2.44</td></tr><tr><td>HD201891</td><td>5948</td><td>4.30</td><td>-0.97</td><td>-1.10</td><td>-1.06</td><td>-1.15</td><td>-1.09</td></tr><tr><td>HD298986</td><td>6223</td><td>4.19</td><td>-1.26</td><td>-1.48</td><td>-1.42</td><td>-1.49</td><td>-1.41</td></tr><tr><td>Sun</td><td>5771</td><td>4.44</td><td>0.03</td><td>-0.04</td><td>0.02</td><td>-0.04</td><td>0.00</td></tr></tbody></table>

well established in the literature for its ability to handle NLTE calculations), and found that the equivalent widths using NLTE profiles agreed within 1 percent for all test cases. This result indicates that the computations by Turbospectrum using NLTE physics are correct, or at least, match well with those from a previous verified source in the literature that has been used to successfully model various observed stellar spectral features in NLTE.

As part of this update, the new version of Turbospectrum is able to compute H line profiles in NLTE as well as line profiles of multiple elements in NLTE at the same time. Our tests with H line computations also show the importance of ⟨3D⟩ NLTE calculations when evaluating the temperature of a star using the wings of H lines in the Balmer series. We also provide an example of a spectrum computed using departure coefficient grids for H, O, Mg, Ca, and Fe at the same time to show how multiple elements can be computed in NLTE at once. This capability will be extremely important in future studies that want to model blends of lines from two elements in NLTE, or to model NLTE lines in a crowded spectral region.

Finally, we provide an example of how the new version of Turbospectrum can be used to determine elemental abundances in observations of stellar spectra by fitting Fe and Ca lines in a number of Gaia FGK benchmark stars. As part of this example, we provide code that involves a Python wrapper that can be used to automate generating spectra with the Fortran based Turbospectrum code, and automates the fitting procedure of spectral

features. Our code also includes a script that cross matches information in an LTE Turbospectrum line list with a model atom to create an NLTE formatted Turbospectrum line list. Our abundance values from the example fits agree well with literature values, and show some of the 1D NLTE and ⟨3D⟩ NLTE effects on abundances determined through spectral fitting as a function of metallicity.

*Acknowledgements.* EM and MB acknowledge support by the Collaborative Research centre SFB 881 (projects A5, A10), Heidelberg University, of the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation). BP is supported in part by the Centre National d'Etudes Spatial es (CNES) in the frame of a PLATO grant. This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (Grant agreement No. 949173). TO and UH acknowledge support from the Swedish National Space Agency (SNSA/Rymdstyrelsen).

<footnote><sup>a</sup> The stellar parameters come from Jofré et al. (2018), with a few updates as described in Gent et al. (2022). We also include the literature [Fe/H] value from Jofré et al. (2018) that was derived using 1D NLTE as a reference.</footnote>
<figure><img src="image_8.png" /><figcaption>Fig. 7: Difference in the [Fe/H] value determined using 1D NLTE (top) and 〈3D〉 NLTE (bottom) and 1D LTE, as a function of [Fe/H]. Symbols are color coded based on the effective temperature of the star. Fits to spectra of the Sun are indicated as stars.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>Fig. 8: [Fe/H] determined from the Turbospectrum fit versus values from the literature (see text). For the TS fit the adopted value is the <3D> NLTE fit, or the 1D NLTE in cases where a <3D> NLTE fit was not available.</figcaption></figure>

## References

* Aldenius, M., Lundberg, H., & Blackwell-Whitehead, R. 2009, A&A, 502, 989

* Alvarez, R. & Plez, B. 1998, A&A, 330, 1109

* Amarsi, A. M., Barklem, P. S., Asplund, M., Collet, R., & Zatsarinny, O. 2018, A&A, 616, A89

* Amarsi, A. M., Lind, K., Asplund, M., Barklem, P. S., & Collet, R. 2016, MNRAS, 463, 1518

* Amarsi, A. M., Lind, K., Osorio, Y., et al. 2020, A&A, 642, A62

* Anstee, S. D. & O'Mara, B. J. 1991, MNRAS, 253, 549

* Anstee, S. D. & O'Mara, B. J. 1995, MNRAS, 276, 859

* Asplund, M. 2005, ARA&A, 43, 481

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

* Bard, A., Kock, A., & Kock, M. 1991, Astron. and Astrophys., 248, 315, (BKK)

* Bard, A. & Kock, M. 1994, Astron. and Astrophys., 282, 1014, (BK)

* Barklem, P. S. & O'Mara, B. J. 1997, MNRAS, 290, 102

* Barklem, P. S. & Piskunov, N. 2015, HLINOP: Hydrogen LINe OPacity in stellar atmospheres

* Barklem, P. S., Piskunov, N., & O'Mara, B. J. 2000, A&AS, 142, 467

* Belyaev, A. K., Yakovleva, S. A., & Barklem, P. S. 2014, A&A, 572, A103

* Bergemann, M. 2011, MNRAS, 413, 2184

* Bergemann, M., Collet, R., Amarsi, A. M., et al. 2017, ApJ, 847, 15

* Bergemann, M., Gallagher, A. J., Eitner, P., et al. 2019, A&A, 631, A80

* Bergemann, M., Hansen, C. J., Bautista, M., & Ruchti, G. 2012a, A&A, 546, A90

* Bergemann, M., Hoppe, R., Semenova, E., et al. 2021, MNRAS, 508, 2236

* Bergemann, M., Kudritzki, R.-P., Würl, M., et al. 2013, ApJ, 764, 115

* Bergemann, M., Lind, K., Collet, R., Magic, Z., & Asplund, M. 2012b, MNRAS, 427, 27

* Bergemann, M. & Nordlander, T. 2014, arXiv e-prints, arXiv:1403.3088

* Bergemann, M., Pickering, J. C., & Gehren, T. 2010, MNRAS, 401, 1334

* Bergemann, M., Serenelli, A., Schönrich, R., et al. 2016, A&A, 594, A120

* Blackwell, D. E., Booth, A. J., Menon, S. L. R., & Petford, A. D. 1986, MNRAS, 220, 289

* Blackwell, D. E., Petford, A. D., & Shallis, M. J. 1979, MNRAS, 186, 657

* Blackwell, D. E., Petford, A. D., Shallis, M. J., & Simmons, G. J. 1982a, MNRAS, 199, 43

* Blackwell, D. E., Petford, A. D., & Simmons, G. J. 1982b, MNRAS, 201, 595

* Blanco-Cuaresma, S., Soubiran, C., Jofré, P., & Heiter, U. 2014, A&A, 566, A98

* Böhm-Vitense, E. 1958, ZAp, 46, 108

* Bressan, A., Marigo, P., Girardi, L., et al. 2012, MNRAS, 427, 127

* Buder, S., Sharma, S., Kos, J., et al. 2020, arXiv e-prints, arXiv:2011.02505

* Buder, S., Sharma, S., Kos, J., et al. 2021, MNRAS, 506, 150

* Carlsson, M. 1986, Uppsala Astronomical Observatory Reports, 33

* Cayrel, R., Depagne, E., Spite, M., et al. 2004, A&A, 416, 1117

* Den Hartog, E. A., Ruffoni, M. P., Lawler, J. E., et al. 2014, ApJS, 215, 23

* Feautrier, P. 1964, Comptes Rendus Academie des Sciences, 258, 3189

* Freytag, B., Steffen, M., Ludwig, H. G., et al. 2012, Journal of Computational Physics, 231, 919

* Froese Fischer, C. & Tachiev, G. 2012, Multiconfiguration Hartree-Fock and Multiconfiguration Dirac-Hartree-Fock Collection, Version 2, available online at http://physics.nist.gov/mchf/

* Fuhr, J. R., Martin, G. A., & Wiese, W. L. 1988, Journal of Physical and Chemical Reference Data, Volume 17, Suppl. 4. New York: American Institute of Physics (AIP) and American Chemical Society, 1988, 17, (FMW)

* Fuhrmann, K., Axer, M., & Gehren, T. 1993, A&A, 271, 451

* Fuhrmann, K., Axer, M., & Gehren, T. 1994, A&A, 285, 585

* Gallagher, A. J., Bergemann, M., Collet, R., et al. 2020, A&A, 634, A55

* Gent, M. R., Bergemann, M., Serenelli, A., et al. 2022, A&A, 658, A147

* Grevesse, N., Asplund, M., & Sauval, A. J. 2007, Space Sci. Rev., 130, 105

* Grupp, F. 2004a, A&A, 420, 289

* Grupp, F. 2004b, A&A, 426, 309

* Gustafsson, B., Bell, R. A., Eriksson, K., & Nordlund, A. 1975, A&A, 500, 67

* Gustafsson, B., Edvardsson, B., Eriksson, K., et al. 2008, A&A, 486, 951

* Haberreiter, M., Schmutz, W., & Hubeny, I. 2008, A&A, 492, 833

* Hauschildt, P. H., Allard, F., & Baron, E. 1999, ApJ, 512, 377
<figure><img src="image_10.png" /></figure>

Fig. 9: Each panel shows the difference between the line abundances derived from a NLTE and an LTE fit for both 〈3D〉 (Stagger) and MARCS model atmospheres for each Ca I line fit for the Sun and Procyon as a function of equivalent width of the line. Fits using MARCS model atmospheres are shown as red squares and those using 〈3D〉 model atmospheres are shown as black circles.

<table><caption>Table 4: Abundance corrections for Fe I lines (relative to 1D LTE).</caption><thead><tr><th>Star name</th><th>1D NLTE</th><th>⟨3D⟩ LTE</th><th>⟨3D⟩ NLTE</th></tr></thead><tbody><tr><td>18Sco</td><td>0.04</td><td>0.03</td><td>0.08</td></tr><tr><td>Arcturus</td><td>0.04</td><td>...</td><td>...</td></tr><tr><td>μ Ara</td><td>0.07</td><td>0.04</td><td>0.06</td></tr><tr><td>η Boo</td><td>0.07</td><td>...</td><td>...</td></tr><tr><td>α CenA</td><td>0.06</td><td>0.04</td><td>0.07</td></tr><tr><td>α CenB</td><td>0.05</td><td>0.10</td><td>0.12</td></tr><tr><td>τ Cet</td><td>0.05</td><td>0.05</td><td>0.09</td></tr><tr><td>δ Eri</td><td>0.04</td><td>0.02</td><td>0.05</td></tr><tr><td>ε Eri</td><td>0.03</td><td>0.03</td><td>0.05</td></tr><tr><td>ε For</td><td>0.04</td><td>-0.04</td><td>0.01</td></tr><tr><td>β Gem</td><td>0.07</td><td>...</td><td>...</td></tr><tr><td>ξ Hya</td><td>0.10</td><td>...</td><td>...</td></tr><tr><td>β Hyi</td><td>0.06</td><td>0.02</td><td>0.05</td></tr><tr><td>Procyon</td><td>0.05</td><td>...</td><td>...</td></tr><tr><td>α Tau</td><td>-0.16</td><td>...</td><td>...</td></tr><tr><td>β Vir</td><td>0.05</td><td>-0.02</td><td>0.03</td></tr><tr><td>ε Vir</td><td>0.10</td><td>...</td><td>...</td></tr><tr><td>HD22879</td><td>0.05</td><td>-0.05</td><td>0.04</td></tr><tr><td>HD49933</td><td>0.06</td><td>...</td><td>...</td></tr><tr><td>HD84937</td><td>0.05</td><td>0.05</td><td>0.12</td></tr><tr><td>HD102200</td><td>0.04</td><td>-0.03</td><td>0.05</td></tr><tr><td>HD106038</td><td>0.05</td><td>...</td><td>...</td></tr><tr><td>HD107328</td><td>0.06</td><td>...</td><td>...</td></tr><tr><td>HD122563</td><td>0.31</td><td>...</td><td>...</td></tr><tr><td>HD140283</td><td>0.08</td><td>-0.01</td><td>0.14</td></tr><tr><td>HD201891</td><td>0.04</td><td>-0.05</td><td>0.01</td></tr><tr><td>HD298986</td><td>0.06</td><td>-0.01</td><td>0.07</td></tr><tr><td>Sun</td><td>0.06</td><td>0.00</td><td>0.04</td></tr><tr><td>Average</td><td>0.05</td><td>0.01</td><td>0.06</td></tr></tbody></table>

Heiter, U., Jofré, P., Gustafsson, B., et al. 2015, A&A, 582, A49

Heiter, U., Lind, K., Bergemann, M., et al. 2021, A&A, 645, A106

Henyey, L., Vardya, M. S., & Bodenheimer, P. 1965, ApJ, 142, 841

Hubeny, I., Allende Prieto, C., Osorio, Y., & Lanz, T. 2021, arXiv e-prints, arXiv:2104.02829

Jofré, P., Heiter, U., Soubiran, C., et al. 2014, A&A, 564, A133

<table><caption>Table 5: Ca I lines used for fitting.</caption><thead><tr><th>λ (Å)</th><th>E<sub>low</sub> (eV)</th><th>log gf</th><th>vdW<sup>a</sup></th><th>Ref.<sup>b</sup></th></tr></thead><tbody><tr><td>5260.387</td><td>2.521</td><td>-1.719</td><td>421.260</td><td>1</td></tr><tr><td>5261.704</td><td>2.521</td><td>-0.579</td><td>421.260</td><td>1</td></tr><tr><td>5512.980</td><td>2.933</td><td>-0.464</td><td>-7.316</td><td>2</td></tr><tr><td>5581.965</td><td>2.523</td><td>-0.555</td><td>400.282</td><td>1</td></tr><tr><td>5588.749</td><td>2.526</td><td>0.358</td><td>400.282</td><td>1</td></tr><tr><td>5590.114</td><td>2.521</td><td>-0.571</td><td>399.282</td><td>1</td></tr><tr><td>5867.562</td><td>2.933</td><td>-1.570</td><td>-7.460</td><td>2</td></tr><tr><td>6102.723</td><td>1.879</td><td>-0.850</td><td>876.233</td><td>3</td></tr><tr><td>6122.217</td><td>1.886</td><td>-0.380</td><td>876.234</td><td>3</td></tr><tr><td>6156.023</td><td>2.521</td><td>-2.521</td><td>978.257</td><td>4</td></tr><tr><td>6162.173</td><td>1.899</td><td>-0.170</td><td>876.234</td><td>3</td></tr><tr><td>6166.439</td><td>2.521</td><td>-1.142</td><td>976.257</td><td>1</td></tr><tr><td>6169.042</td><td>2.523</td><td>-0.797</td><td>976.257</td><td>1</td></tr><tr><td>6169.563</td><td>2.526</td><td>-0.478</td><td>978.257</td><td>1</td></tr><tr><td>6439.075</td><td>2.526</td><td>0.390</td><td>366.242</td><td>1</td></tr><tr><td>6455.598</td><td>2.523</td><td>-1.340</td><td>365.241</td><td>2</td></tr><tr><td>6471.662</td><td>2.526</td><td>-0.686</td><td>365.241</td><td>1</td></tr><tr><td>6493.781</td><td>2.521</td><td>-0.109</td><td>364.239</td><td>1</td></tr><tr><td>6499.650</td><td>2.523</td><td>-0.818</td><td>364.239</td><td>1</td></tr></tbody></table>

Notes. (a) Van der Waals broadening parameter from Anstee & O'Mara (1991, 1995) and Barklem et al. (2000). (b) References for gf-values:

(1) Smith & Raggett (1981) (2) Smith (1988) (3) Aldenius et al. (2009)

(4) Froese Fischer & Tachiev (2012)

Jofré, P., Heiter, U., Tucci Maia, M., et al. 2018, Research Notes of the American Astronomical Society, 2, 152

Kovalev, M., Bergemann, M., Ting, Y.-S., & Rix, H.-W. 2019, A&A, 628, A54

Kurucz, R. L. 1970, SAO Special Report, 309

Kurucz, R. L. 1979, ApJS, 40, 1

Kurucz, R. L. 2005, Memorie della Societa Astronomica Italiana Supplementi, 8, 14

Larsen, S. S., Eitner, P., Magg, E., et al. 2021, arXiv e-prints, arXiv:2112.00081

Leenaarts, J., Carlsson, M., & Rouppe van der Voort, L. 2012, ApJ, 749, 136

Lind, K., Amarsi, A. M., Asplund, M., et al. 2017, MNRAS, 468, 4311
<table><caption>Table 6: Results for Ca I ([Ca/Fe] using a solar abundance of log A(Ca) = 6.37).</caption><thead><tr><th rowspan="2">Star name</th><th colspan="2">Adopted<sup>a</sup> →</th><th colspan="4">Derived →</th></tr><tr><th>T<sub>eff</sub> [K]</th><th>log g [cms<sup>-2</sup>]</th><th>[Fe/H]<sup>b</sup></th><th>1D LTE</th><th>1D NLTE</th><th>⟨3D⟩ LTE</th><th>⟨3D⟩ NLTE</th></tr></thead><tbody><tr><td>18 Sco</td><td>5810</td><td>4.44</td><td>0.07</td><td>-0.01</td><td>-0.06</td><td>0.03</td><td>-0.03</td></tr><tr><td>Arcturus</td><td>4286</td><td>1.60</td><td>-0.63</td><td>0.11</td><td>0.04</td><td>...</td><td>...</td></tr><tr><td>μ Ara</td><td>5902</td><td>4.30</td><td>0.33</td><td>0.00</td><td>-0.05</td><td>0.03</td><td>-0.05</td></tr><tr><td>η Boo</td><td>6099</td><td>3.79</td><td>0.23</td><td>0.08</td><td>-0.20</td><td>...</td><td>...</td></tr><tr><td>α CenA</td><td>5792</td><td>4.31</td><td>0.20</td><td>-0.01</td><td>-0.06</td><td>0.03</td><td>-0.05</td></tr><tr><td>α CenB</td><td>5231</td><td>4.53</td><td>0.32</td><td>-0.06</td><td>-0.08</td><td>0.01</td><td>-0.00</td></tr><tr><td>τ Cet</td><td>5414</td><td>4.49</td><td>-0.38</td><td>0.12</td><td>0.09</td><td>0.19</td><td>0.15</td></tr><tr><td>δ Eri</td><td>4954</td><td>3.76</td><td>0.03</td><td>-0.03</td><td>-0.05</td><td>-0.00</td><td>-0.03</td></tr><tr><td>ε Eri</td><td>5076</td><td>4.61</td><td>-0.06</td><td>0.05</td><td>0.04</td><td>0.03</td><td>0.01</td></tr><tr><td>ε For</td><td>5123</td><td>3.45</td><td>-0.60</td><td>0.35</td><td>0.31</td><td>0.39</td><td>0.28</td></tr><tr><td>β Gem</td><td>4858</td><td>2.90</td><td>0.03</td><td>0.01</td><td>-0.02</td><td>...</td><td>...</td></tr><tr><td>ξ Hya</td><td>5044</td><td>2.87</td><td>0.06</td><td>0.01</td><td>-0.06</td><td>...</td><td>...</td></tr><tr><td>β Hyi</td><td>5873</td><td>3.98</td><td>-0.19</td><td>0.07</td><td>-0.05</td><td>0.08</td><td>-0.08</td></tr><tr><td>Procyon</td><td>6554</td><td>4.00</td><td>-0.19</td><td>0.07</td><td>-0.11</td><td>-0.04</td><td>-0.22</td></tr><tr><td>α Tau</td><td>3927</td><td>1.11</td><td>-0.36</td><td>0.22</td><td>0.07</td><td>...</td><td>...</td></tr><tr><td>β Vir</td><td>6083</td><td>4.10</td><td>0.03</td><td>0.09</td><td>-0.03</td><td>0.07</td><td>-0.09</td></tr><tr><td>ε Vir</td><td>4983</td><td>2.77</td><td>0.05</td><td>-0.03</td><td>-0.08</td><td>...</td><td>...</td></tr><tr><td>HD22879</td><td>5868</td><td>4.27</td><td>-0.86</td><td>0.27</td><td>0.19</td><td>0.23</td><td>0.17</td></tr><tr><td>HD49933</td><td>6635</td><td>4.20</td><td>-0.48</td><td>0.13</td><td>-0.03</td><td>...</td><td>...</td></tr><tr><td>HD84937</td><td>6356</td><td>4.06</td><td>-2.25</td><td>0.33</td><td>0.30</td><td>0.34</td><td>0.24</td></tr><tr><td>HD102200</td><td>6155</td><td>4.22</td><td>-1.26</td><td>0.28</td><td>0.16</td><td>0.23</td><td>0.15</td></tr><tr><td>HD106038</td><td>6121</td><td>4.55</td><td>-1.41</td><td>0.28</td><td>0.18</td><td>...</td><td>...</td></tr><tr><td>HD107328</td><td>4496</td><td>2.09</td><td>-0.33</td><td>0.00</td><td>-0.05</td><td>...</td><td>...</td></tr><tr><td>HD122563</td><td>4635</td><td>1.40</td><td>-2.53</td><td>-0.62</td><td>-0.55</td><td>...</td><td>...</td></tr><tr><td>HD140283</td><td>5792</td><td>3.65</td><td>-2.44</td><td>0.09</td><td>0.09</td><td>0.05</td><td>0.11</td></tr><tr><td>HD201891</td><td>5948</td><td>4.30</td><td>-1.09</td><td>0.25</td><td>0.15</td><td>0.21</td><td>0.09</td></tr><tr><td>HD298986</td><td>6223</td><td>4.19</td><td>-1.41</td><td>0.24</td><td>0.15</td><td>0.21</td><td>0.13</td></tr><tr><td>Sun</td><td>5771</td><td>4.44</td><td>0.00</td><td>0.02</td><td>-0.03</td><td>0.03</td><td>-0.03</td></tr></tbody></table>

Lind, K., Asplund, M., Barklem, P. S., & Belyaev, A. K. 2011, A&A, 528, A103

Magg, E., Bergemann, M., Serenelli, A., et al. 2022, arXiv e-prints, arXiv:2203.02255

Magic, Z., Collet, R., Asplund, M., et al. 2013a, A&A, 557, A26

Magic, Z., Collet, R., Hayek, W., & Asplund, M. 2013b, A&A, 560, A8

Mashonkina, L., Korn, A. J., & Przybilla, N. 2007, A&A, 461, 261

Mashonkina, L., Sitnova, T., & Belyaev, A. K. 2017, A&A, 605, A53

Mashonkina, L., Zhao, G., Gehren, T., et al. 2008, A&A, 478, 529

Masseron, T., Osorio, Y., García-Hernández, D. A., et al. 2021, A&A, 647, A24

May, M., Richter, J., & Wichelmann, J. 1974, A&AS, 18, 405, (MRW)

McLaughlin, B. M., Stancil, P. C., Sadeghpour, H. R., & Forrey, R. C. 2017a, Journal of Physics B Atomic Molecular Physics, 50, 209501

McLaughlin, B. M., Stancil, P. C., Sadeghpour, H. R., & Forrey, R. C. 2017b, Journal of Physics B Atomic Molecular Physics, 50, 114001

Mihalas, D., Dappen, W., & Hummer, D. G. 1988, ApJ, 331, 815

Nordlund, Å. 1984, in Methods in Radiative Transfer, ed. W. Kalkofen, Cambridge University Press, 211

Nordlund, Å., Stein, R. F., & Asplund, M. 2009, Living Reviews in Solar Physics, 6, 2

O'Brian, T. R., Wickliffe, M. E., Lawler, J. E., Whaling, W., & Brault, J. W. 1991, Journal of the Optical Society of America B Optical Physics, 8, 1185, (BWL)

Piskunov, N. & Valenti, J. A. 2017, A&A, 597, A16

Piskunov, N. E., Kupka, F., Ryabchikova, T. A., Weiss, W. W., & Jeffery, C. S. 1995, A&AS, 112, 525

Plez, B. 2012, Turbospectrum: Code for spectral synthesis

Reetz, J. 1991, Diplomarbeit, Universität München

Reetz, J. 1999, Ap&SS, 265, 171

Ruffoni, M. P., Den Hartog, E. A., Lawler, J. E., et al. 2014, MNRAS, 441, 3127

Ryabchikova, T., Piskunov, N., Kurucz, R. L., et al. 2015, Phys. Scr, 90, 054005

Semenova, E., Bergemann, M., Deal, M., et al. 2020, A&A, 643, A164

Shen, G., Kuri, A., Fontenla, J. M., Stancil, P. C., & Wang, J. G. 2014, in APS Division of Atomic, Molecular and Optical Physics Meeting Abstracts, APS Meeting Abstracts, D1.122

Sitnova, T. M., Mashonkina, L. I., & Ryabchikova, T. A. 2016, MNRAS, 461, 1000

Smith, G. 1988, Journal of Physics B Atomic Molecular Physics, 21, 2827, (S)

Smith, G. & Raggett, D. S. J. 1981, Journal of Physics B Atomic Molecular Physics, 14, 4015, (SR)

Smith, V. V., Bizyaev, D., Cunha, K., et al. 2021, AJ, 161, 254

Sneden, C. 1973, ApJ, 184, 839

Sobeck, J. S., Kraft, R. P., Sneden, C., et al. 2011, AJ, 141, 175

Uitenbroek, H. & Criscuoli, S. 2011, ApJ, 736, 69

Valenti, J. A. & Piskunov, N. 1996, A&AS, 118, 595

Voronov, Y. V., Yakovleva, S. A., & Belyaev, A. K. 2022, ApJ, 926, 173

Wishart, A. W. 1979, MNRAS, 187, 59P

Wolnik, S. J., Berthel, R. O., & Wares, G. W. 1970, ApJ, 162, 1037

Wolnik, S. J., Berthel, R. O., & Wares, G. W. 1971, ApJ, 166, L31+, (WBW)

Yakovleva, S. A., Belyaev, A. K., & Bergemann, M. 2020, Atoms, 8, 34

Young, M. E. & Short, C. I. 2014, ApJ, 787, 43

<footnote>a See Table 3 for reference.</footnote>

<footnote>b The ⟨3D⟩ NLTE fit or 1D NLTE fit from Table 3 (see Section 5.2 for details).</footnote>
<figure><img src="image_11.png" /><figcaption>Fig. 10: Difference in the [Ca/Fe] value determined using 1D NLTE (top) and 〈3D〉 NLTE (bottom) and 1D LTE as a function of [Fe/H]. Symbols are color coded based on the effective temperature of the star. Fits to spectra of the Sun are indicated as stars.</figcaption></figure>

<table><caption>Table 7: Abundance corrections for Ca I lines (relative to 1D LTE).</caption><thead><tr><th>Star name</th><th>1D NLTE dex</th><th>⟨3D⟩ LTE dex</th><th>⟨3D⟩ NLTE dex</th></tr></thead><tbody><tr><td>18 Sco</td><td>-0.05</td><td>0.04</td><td>-0.02</td></tr><tr><td>Arcturus</td><td>-0.07</td><td>...</td><td>...</td></tr><tr><td>μ Ara</td><td>-0.05</td><td>0.03</td><td>-0.05</td></tr><tr><td>η Boo</td><td>-0.28</td><td>...</td><td>...</td></tr><tr><td>α CenA</td><td>-0.05</td><td>0.04</td><td>-0.04</td></tr><tr><td>α CenB</td><td>-0.02</td><td>0.07</td><td>0.06</td></tr><tr><td>τ Cet</td><td>-0.03</td><td>0.07</td><td>0.03</td></tr><tr><td>δ Eri</td><td>-0.02</td><td>0.03</td><td>0.00</td></tr><tr><td>ε Eri</td><td>-0.01</td><td>-0.02</td><td>-0.04</td></tr><tr><td>ε For</td><td>-0.04</td><td>0.04</td><td>-0.07</td></tr><tr><td>β Gem</td><td>-0.03</td><td>...</td><td>...</td></tr><tr><td>ξ Hya</td><td>-0.07</td><td>...</td><td>...</td></tr><tr><td>β Hyi</td><td>-0.12</td><td>0.01</td><td>-0.15</td></tr><tr><td>Procyon</td><td>-0.18</td><td>-0.11</td><td>-0.29</td></tr><tr><td>α Tau</td><td>-0.15</td><td>...</td><td>...</td></tr><tr><td>β Vir</td><td>-0.12</td><td>-0.02</td><td>-0.18</td></tr><tr><td>ε Vir</td><td>-0.05</td><td>...</td><td>...</td></tr><tr><td>HD22879</td><td>-0.08</td><td>-0.04</td><td>-0.10</td></tr><tr><td>HD49933</td><td>-0.16</td><td>...</td><td>...</td></tr><tr><td>HD84937</td><td>-0.03</td><td>0.01</td><td>-0.09</td></tr><tr><td>HD102200</td><td>-0.12</td><td>-0.05</td><td>-0.13</td></tr><tr><td>HD106038</td><td>-0.10</td><td>...</td><td>...</td></tr><tr><td>HD107328</td><td>-0.05</td><td>...</td><td>...</td></tr><tr><td>HD122563</td><td>0.07</td><td>...</td><td>...</td></tr><tr><td>HD140283</td><td>0.00</td><td>-0.04</td><td>0.02</td></tr><tr><td>HD201891</td><td>-0.10</td><td>-0.04</td><td>-0.16</td></tr><tr><td>HD298986</td><td>-0.09</td><td>-0.03</td><td>-0.11</td></tr><tr><td>Sun</td><td>-0.05</td><td>0.01</td><td>-0.05</td></tr><tr><td>Average</td><td>-0.07</td><td>0.0</td><td>-0.08</td></tr></tbody></table>