Cold diffuse interstellar medium of Magellanic Clouds: II. Physical conditions from excitation of CI and H$_2$

We present a comprehensive study of the excitation of CI fine-structure levels along 57 sight lines in the Large and Small Magellanic Clouds. The sight lines were selected by the detection of H$_2$ in FUSE spectra. Using archival HST/COS and HST/STIS spectra we detected absorption of CI fine-structure levels and measured their populations for 29 and 22 sight lines in the LMC and SMC, respectively. The CI column density ranges from $10^{13}$ to $10^{14}\,{\rm cm}^{-2}$ for the LMC and $10^{13}$ to $10^{15.4}\,{\rm cm}^{-2}$ for the SMC. We found excitation of CI fine-structure levels in the LMC and SMC to be 2-3 times higher than typical values in local diffuse ISM. Comparing excitation of both CI fine-structure levels and H$_2$ rotational levels with a grid of PDR Meudon models we find that neutral cold gas in the LMC and SMC is illuminated by stronger UV field than in local ISM ($\chi=5^{+7}_{-3}$ units of Mathis field for the LMC and $2^{+4}_{-1}$ for the SMC) and has on average higher thermal pressure ($\log p/k =4.2\pm0.4$ and $4.3\pm0.5$, respectively). Magellanic Clouds sight lines likely probe region near star-formation sites, which also affects the thermal state and CI/H$_2$ relative abundances. At the same time such high measurements of UV field are consistent with some values obtained at high redshifts. Together with low metallicities this make Magellanic Clouds to be an interesting test case to study of the central parts of high redshift galaxies.


INTRODUCTION
Study of the interstellar medium (ISM) is an essential part of unraveling the processes of galaxy evolution, as gas in the ISM supplies star formation process which defines galaxy evolution landscape. In turn, ongoing star-formation affects the gas in the ISM by ultraviolet (UV) radiation, cosmic rays, shock waves, stellar outflows and other processes. All of these processes may change the physical state of the gas leading to the ionization of atoms, dissociation and formation of molecules, excitation of energy levels of elements. Therefore, observations of interstellar clouds by measurements of elemental abundances and ionization states, and excitation of energy levels of species may constrain physical conditions in the ISM and shed light on galaxy evolution process.
H 2 molecule, being the most abundant molecule in the Universe, is one of the main tracers of the cold phase of diffuse neutral ISM ( ∼ 100 K). In the typical ISM, the cold phase likely have relatively high densities, ≳ 100 cm −3 , which also favours the production of neutral carbon (C i) due to recombination of C ii. The latter, however, is still the dominant ionization state of carbon in diffuse ISM. A tight connection between presence of H 2 and C i in the diffuse ISM is well confirmed by spectroscopic observations of UV resonant absorption lines of these species towards bright background sources both in ★ E-mail: kosenkodn@yandex.ru † E-mail: s.balashev@gmail.com local ISM (e.g. Jenkins & Tripp 2001;Burgh et al. 2010) and at high redshifts (e.g. Srianand et al. 2005;Noterdaeme et al. 2018).
A joint analysis of H 2 rotational and C i fine-structure levels population allows to constrain conditions in the diffuse medium, namely, kinetic temperature, kin , intensity of the ultraviolet (UV) field, , and total hydrogen gas density, H . This method have been applied to several systems at high redshifts (Balashev et al. 2017;Klimenko & Balashev 2020;Balashev et al. 2019Balashev et al. , 2020Kosenko et al. 2021) and in our Galaxy and Magellanic Clouds (Klimenko & Balashev 2020). The latter is interesting since the physical conditions, in particularly UV field intensity and metallicity in Magellanic Clouds is known to be different from ones in our Galaxy. Hence the analysis of C i and H 2 provides an important view on how metallicity may affect the thermal state of the diffuse ISM.
Large and Small Magellanic Clouds (LMC and SMC, respectively) are one the closest dwarf galaxies to the Milky Way (MW). Their average metallicities are smaller then in our Galaxy ( ∼ 0.5 ⊙ for the LMC and ∼ 0.2 ⊙ for the SMC, Russell & Dopita 1992). Metallicity of the SMC is also comparable to the mean metallicity of the high-redshift systems (e.g. , and references therein). Since the LMC and SMC are close to the Milky Way (50 kpc and 62 kpc, respectively, Pietrzyński et al. 2019;Graczyk et al. 2020), there is a unique possibility to study the ISM of low-metallicity galaxies with numerous sight lines. In our accompanying paper (Kosenko & Balashev 2023, here and after Paper I) we have revisited archival data, obtained by Far Ultraviolet Spectro-scopic Explorer (FUSE, Moos et al. 2000;Sahnow et al. 2000) space telescope in Magellanic Clouds (Blair et al. 2009;Welty et al. 2012). We focused on identification of line transition of HD molecules and independently reanalysed H 2 absorption systems in 48 and 46 sightlines towards stars in the LMC and SMC, respectively. We found HD in 24 systems in Magellanic Clouds, 19 out of which have not been reported before. Some of sightlines have archival observations with a high spectral resolution using Hubble Space Telescope (HST) Cosmic Origins Spectrograph (COS, Green et al. 2012) and Space Telescope Imaging Spectrograph (STIS, Woodgate et al. 1998), which cover the strongest C i transitions. This provide an opportunity to systematically study the physical conditions in diffuse medium of the LMC and SMC by joint analysis C i fine-structure and H 2 rotational levels populations, that is presented in this paper.
The paper is organized as follows. In Section 2 we describe a sample of data which was used in the work. Section 3 presents the method that we used to analyse observations. The results of data analysis are summarised in Section 4. We present constraints on the physical condition in the observed systems in Section 5. Section 6 is devoted to discussion of our results, before we summarize in Section 7.

DATA
H 2 and C i absorption lines fall into UV part of electromagnetic spectrum, which are limited for observation due to atmospheric absorption. The progress of H 2 and C i observations in the Milky Way and in nearby galaxies was certainly attributed to availability of the space UV telescopes. The best resolution and quality observations of H 2 lines wavelength range were performed by FUSE (the wavelength range 907-1187 Å and nominal spectral resolution ∼ 20000), HST/COS ( 900 -2150 Å and ∼ 20000) and STIS (1150-3100 Å, and ∼ 30000 − 110000). We described in details the analysis of FUSE data in Paper I. In this paper we focus on the HST data, which cover the strongest C i and metal transitions. Among 94 sight lines discussed in Paper I we found 29 sight lines in the LMC and 28 sight lines in the SMC that have archival HST observations 1 and are well suited for analysis of C i and metal absorption lines. Several C i transitions are covered also by FUSE observations, but these lines are weak and usually strongly blended. Additionally, spectral resolution of HST/STIS is much better than for FUSE. We have HST/STIS data for 21 systems out of 29 in the LMC and 23 out of 28 in the SMC. For the other we used HST/COS data, which have similar nominal resolution as FUSE, but better quality of the spectra, e.g. it is less affected by wavelength calibration issues.

ANALYSIS
In spectra towards the stars in the LMC and SMC we usually detect two groups of absorption lines: the first is related to gas in Milky Way disk and halo and shifted by ∼ 0 km s −1 with respect to Local Standard of Rest (LSR) and the second is related to gas in the LMC and SMC and shifted by 180-330 km s −1 and 90-180 km s −1 , respectively. In several cases we detect absorptions that have intermediate velocity shift and are likely related to high velocity cloud in Milky-Way halo or/and gas stream between the MW and the LMC and SMC. In most of the cases each group can be resolved into a few sub-components, therefore we used the line profile fitting technique to model absorption lines.

Method
We model line profiles with standard multicomponent Voigt profile 2 . We used Bayesian framework to estimate posterior distribution functions for the absorption system parameters: column densities, (measured throughout the paper in cm −2 ), Doppler parameters, , and redshifts, . To sample posteriors we used affine-invariant Monte Carlo Markov Chain (MCMC) sampler (Goodman & Weare 2010). The continuum was independently constructed for each considered fit (C i, Zn ii etc) by B-spline interpolation of the neighboring regions to absorption lines, clear from the evident absorptions.
To report point and interval estimates on the parameters we use maximum aposteriori probability and highest posterior density 68.3% credible intervals, respectively. Upper limits on column densities (where necessary) were found using one-sided 3 (99.7%) credible interval. We note that reported uncertainties are statistical ones, derived in particular model assumptions. Systematic uncertainties, arisen from continuum placement, particular choice of fitting spectral pixels, and component decomposition in some cases may dominate the statistical ones, therefore the latter should be taken with caution, especially in some systems, where the reported uncertainties are found to be relatively small (in comparison to other systems). From the other side, since we used MCMC sampler to constrain the posterior distribution, we were able to explore a multimodal structure of the likelihood function and hence in some cases our constraints on column density are quite wide, since it includes multimodal distribution (e.g. both non-saturated and saturated solutions) for the line profiles.
Using HST spectra we fit C i absorption lines from three finestructure levels (denoted below as C i, C i * and C i * * ) with an assumption of tied redshifts and Doppler parameters between them. This is reasonable approximation, since C i levels are mostly populated by collisions and hence typically quite homogeneously populated within the cloud, unless density and temperatures do not drastically change.
Since we study C i in highly saturated H 2 clouds, where molecular hydrogen is already self-shielded, the temperature variations are likely small.
An important ingredient for determination of the physical conditions in the gas phase is metallicity. We measure metallicity in the systems using Zn ii or (if possible) P ii absorption lines, which are believed to be weakly depleted (De Cia et al. 2018). In other cases we use S ii absorption lines. The column density of H i was taken from Welty et al. 2012;Roman-Duval et al. 2019. The metallicity was calculated as, ≡ [X/H] ≡ log ( (X)/ (H)) − log (X/H) ⊙ , where X -is an element used to derive metallicity, and solar abundances, (X/H) ⊙ are taken from Asplund et al. 2009.

Details on some individual sightlines
Below we provide some details regarding several interesting sightlines.

Sk-67 5
The star is located in diffuse H ii region on the Western edge of the LMC. Tchernyshyov et al. 2015;Roman-Duval et al. 2021 exhaustively studied metals in this system, using HST data, and our measurement of Zn ii column density (12.98 +0.02 −0.01 ) is consistent with their results (13.03 ± 0.02). Additionally, Roman-Duval et al. 2019 studied H i and C i (for H i they got 21.02 ± 0.04, which agrees well with value found by Welty et al. 2012, therefore we used a value given by Welty et al. 2012). We got total log (C i) to be 14.02 +0.02 −0.01 (we fitted with 3 components in the LMC), slightly higher than obtained by Roman-Duval et al. 2021, 13.86 +0.01 −0.01 (a similar value was also obtained by Welty et al. 2016). Meanwhile our relative abundance on C i levels are well consistent with obtained by Roman-Duval et al. 2021, while their column densities log (C i) = 13.65 ± 0.02, log (C i * ) = 13.32 ± 0.02, log (C i * * ) = 12.86 +0.04 −0.05 resemble what we derived in the central component of C i profile.

Sk-67 105
Sk-67 105 is one of the most massive eclipsing binary system (Niemela & Morrell 1986) in the LMC, which probably reveals a contact configuration with 48.3 ⊙ and 31.4 ⊙ (Ostrov & Lapasset 2003). From H 2 lines (mostly from saturated J = 0 and 1) we found an evidence of partial coverage of absorption system towards Sk-67 105. To get more reliable results we corrected fit of H 2 lines for partial covering factor found to be 0.888 +0.002 −0.002 . Also we used HST archival data to measure C i fine-structure level population in this system and found that our results are consistent with the values obtained by Roman-Duval et al. 2021. Our result on Zn ii column density log (ZnII) = 12.87 +0.05 −0.08 is also consistent with the result of Roman-Duval et al. 2021 and therefore gives one of the lowest metallicity in our LMC sample.

Sk-68 135
The star is located in the north of 30 Dor complex, one of the most studied star-forming regions. Metals and C i have been studied by Tchernyshyov et al. 2015;Roman-Duval et al. 2021. Roman-Duval et al. 2021 found log (C i) = 14.17 +0.04 −0.05 , log (C i * ) = 13.97 ± 0.03, log (C i * * ) = 13.55 ± 0.04 which agrees with our results, except C i * , which we found to be slightly larger. Our result on Zn ii column density 13.35 ± 0.01 agrees with a value 13.36 ± 0.06 found by Tchernyshyov et al. 2015.

Sk-69 246
This star belongs to 30 Dor complex and the system on the lineof-sight have previously been studied by Bluhm &de Boer 2001 andAndré et al. 2004. These authors reported CO molecules in this system, using FUSE spectra, however, we checked that HST data and do not confirm the detection of CO at reported column density.
Our results on C i, C i * and C i * * column densities are close to that of André et al. 2004

AV 95
The star AV 95 belongs to the bar of SMC and the system towards AV 95 have previously been studied by André et al. 2004;Tchernyshyov et al. 2015;Jenkins & Wallerstein 2017. For C i, C i * and C i * * we could place only upper limits on column densities due to low S/N of the spectrum and weakness of the lines. André et al. 2004 reported measurements, but, as was noted above, they used only lines seen in the FUSE spectra and lines around 1275 Å from HST/STIS data, while we additionally used stronger carbon lines in HST high-resolution spectrum. Our estimate on Zn ii column density, log (ZnII) = 13.08 ± 0.02, agrees with both values 13.09 +0.05 −0.06 and 13.15 ± 0.03 found by Tchernyshyov et al. 2015 andWallerstein 2017, respectively.

AV 242
In the system towards AV 242 we found an evidence of high velocity clouds (HVC), which contains H 2 molecules (see Paper I). To our knowledge, it is the first found HVC towards the SMC containing H 2 and it had not been discussed before. We also found C i in this HVC log HVC (CI) = 12.91 +0.05 −0.08 and log (ZnII) = 12.66 +0.09 −0.10 . Metal lines have been studied by Jenkins & Wallerstein 2017, their reported Zn ii column density, 13.39 +0.14 −0.21 , is consistent with ours measured value 13.17 +0.04 −0.05 summed over the components. However, as Jenkins & Wallerstein 2017 used AOD method, they could not separate subcomponents seen in this sightline.

Sk 191
We found one of the highest H 2 column density along the sightline towards Sk 191, while there was lack of Zn ii in this system. On the one hand, this can be explained by exceptionally low metallicity. The star is located close to Magellanic Bridge, which reveals abundances lower than in the LMC and SMC, therefore the medium in front of Sk 191 may have lower metallicity. But on the other hand, the environment may have an especially high depletion and a possible detection of O i by Jenkins & Wallerstein 2017 confirms this assumption. Also such a high H 2 column density may possibly be an evidence of high depletion, since H 2 forms mainly on the surface of dust grains and correlates with amount of dust .

RESULTS
C i absorption was detected towards the majority of the studied sightlines (22 out of 28 systems in the SMC and 29 out 29 systems in the LMC). The excitation of C i fine-structure levels was measured in 23 systems in the LMC and 12 systems in the SMC. The fitting results are summarized in Tables 1 and 2 for the LMC and SMC, respectively. Fit to the line profiles are shown in the Appendix A. Upper limits were constrained from 3 confidence interval Upper limits were constrained from 3 confidence interval

Metallicity
The measurements of metallicity are given in the second column of Tables 3 and 4 for the LMC and SMC, respectively and lines are shown in the Appendix B. The average metallicity in our sample is log LMC ∼ −0.66 with dispersion of 0.22 and log SMC ∼ −0.99 with standard deviation of 0.19 for the LMC and SMC, respectively. It is less by −0.3 dex and −0.7 dex than the average gas phase metallicity measured in local MW ISM (e.g., Ritchey et al. 2023). These values are consistent with previous values reported in literature (log * ∼ −0.2 for the LMC and log * ∼ −0.6 for the SMC relative to local ISM, Russell & Dopita 1992). The difference in absolute values are partially due to the difference in solar abundances between Anders & Grevesse (1989) and Asplund et al. (2009). Also it can be explained by depletion of metals by dust and usage of the different species, or selection effects, since our targets probe a cold phase of the ISM. Meanwhile, even in local ISM the value of metallicity is debatable and possibly has large variations De Cia et al. 2021, but see also Ritchey et al. (2023).

C i/H 2 abundances
In the left panel of Fig. 1 we show the column densities of C i and H 2 in the LMC and SMC and their comparison with measurements in the Milky Way (Jenkins & Tripp 2011) and in high redshift DLAs (see, e.g. Klimenko & Balashev 2020, and references therein). We found that on average C i column densities in the SMC is less than in the LMC and both are less than in the MW and DLAs. The difference in C i abundance (and C i/H 2 relative abundance) between the LMC, SMC and MW can be due to the difference in gas phase metallicity. A higher C i abundances in high-z DLAs can be due to the selection effect (many C i bearing high-z DLAs were preselected by the presence of strong C i in SDSS spectra, see e.g. Noterdaeme et al. 2018) and/or distinct physical conditions. Both these factors likely explain large dispersion of C i/H 2 ratios measured at high-z.
The right panel of Fig 1 shows C i/H 2 relative abundance as a function of metallicity in different samples. While the C i abundance is evidently scaled with the total carbon abundance in the medium, and hence metallicity 3 , it also strongly depends on the chemistry of the clouds, since C i is not the dominant form of the carbon in diffuse clouds. Indeed the formation rate of C i depends on the metallicity, since it is produced from C ii either by recombination with electron or small dust grains (Wolfire et al. 2008). Both electron and dust abundances, interactively depend on the metallicity, especially at the low values of the latter. Moreover H 2 abundance scales with the metallicity as well, since the main formation channel of H 2 molecules is the formation on the surface of dust grains, which abundance is proportional with the metallicity. Therefore dependence of C i/H 2 ratio on the metallicity is relatively complicated and requires comprehensive modelling. We will exhaustively consider C i/H 2 abundance in a separate study (Balashev&Kosenko in prep.).

Kinetic temperature
It is well known that bulk of H 2 J=0 and J=1 reside in the inner, self-shielded part of the medium (see e.g. Balashev et al. 2009;Klimenko & Balashev 2020) reflecting its thermal state. As it was done previously in many studies, we used H 2 ortho-para (determined by J=0, 1) excitation temperature, 01 to constrain the kinetic temperature of cold phase of ISM, probed by H 2 /C i absorptions. Fig. 2 shows H 2 excitation temperature as a function of H 2 column density, measured in Magellanic Clouds (taken from paper I), in our Galaxy (Savage et al. 1977;Gillmon et al. 2006), and at high-redshifts (see e.g. Balashev et al. 2019, and references therein). One can see that Magellanic Cloud sample, consistent with both high-redshift and MW sample over most of the range of H 2 column density. However, we note that recently an extensive survey of H 2 in our Galaxy based on FUSE data by Shull et al. 2021 reveals higher 01 temperatures, that were previously derived by Savage et al. 1977;Gillmon et al. 2006;Rachford et al. 2002Rachford et al. , 2009. This discrepancy if it is real, devotes an additional study. Apart from this, we definitely see that our measurements confirm the trend of decreasing 01 with increase of H 2 column density for the Magellanic Cloud sample (previously reported for the MW and high-z samples by Muzahid et al. 2015;Balashev et al. 2017;Klimenko & Balashev 2020). However, due to large scatter, the correlation for Magellanic Clouds is weak, but significant (Pearson correlation coefficients are about −0.16 and -0.14 with p-values 5.3 × 10 −5 and 3.7 × 10 −5 for LMC and SMC, respectively). We find a similar correlation for the sample of high-redshift DLAs ( = −0.14 with -value of 0.0006), which cover the same range of H 2 column densities. The correlation in the MW sample (using temperatures reported by Savage et al. 1977;Gillmon et al. 2006 data) is stronger: = −0.49 with -value 1.4 × 10 −7 . However the MW sample probe more saturated H 2 gas clouds, than other samples.

Excitation of fine structure levels
In the Fig. 3 we plot C i column density ratios ′ 1 = (C i * )/ (C i) vs ′ 2 = (C i * * )/ (C i) 4 . measured in Magellanic Clouds, Milky Way and high-redshift galaxies. One can see that measurements at high redshifts show large dispersion, as Magellanic Clouds values, while measurements in our Galaxy reveal systematically lower excitation of the upper fine-structure levels. The possible explanation is lower UV field intensity in Milky Way (as the main sources of C i excitation are collisions and excitation by UV radiation and CMB) and it will be discussed below. We compare these measurements with model curves that were calculated for = 50, 100, 200 K in the range of number densities = 1 − 10 5 cm −3 . Regarding collisional partner we considered two limiting cases: atomic and molecular hydrogen, denoted it by the molecular fraction parameter, H 2 = 2 (H 2 )/(2 (H 2 ) + (HI)).
One can see that measured values follow model tracks, indicating that we likely have no drastic misfits of the line profiles. Importantly, the relatively large uncertainties do not allow to constrain temperature, number density and molecular fraction, using only the measurements on ′ 1 and ′ 2 ratios, since the parameter space is degenerate. Jenkins & Tripp 2001, 2011 described a method how to constrain number density and fraction of low-pressure gas from C i fine-structure level population, using the additional estimates on the temperature and UV field intensity. To get constraints on their model requires C ii column densities (using ionization balance for carbon and hydrogen together, see Equations 1 and 2 in Jenkins & Tripp 2011), since carbon is mostly ionized by UV radiation. In our work, we followed a different approach, where the supplemental data was obtained from fit to H 2 rotational levels population (see Klimenko & Balashev 2020). This allows us to get constraints on H and , omitting additional calculations of C ii column density (where we have lack of the direct measurement) and of low and high pressure gas fractions. This is discussed in the next Section.

PHYSICAL CONDITIONS
Number density and UV field strength can be constrained from comparison of the measured populations of H 2 rotational and C i finestructure levels with ones calculated on the grids of models using Meudon PDR code (Klimenko & Balashev 2020). It was applied systematically to systems at high redshifts (Balashev et al. 2019Klimenko & Balashev 2020;Kosenko et al. 2021) and also to few systems in the Milky Way, LMC and SMC (Klimenko & Balashev 2020).
In this work we used only two lower H 2 rotational levels (J ≤ 1), which contains the most of H 2 and basically reproduce the thermal 4 Note that Jenkins & Tripp 2001, 2011 used 1 = (C i * )/ (C i tot ) and 2 = (C i * * )/ (C i tot ) in their works. However, the plots 1 -2 and ′ 1 -′ 2 look quite similar.  (Rachford et al. 2002(Rachford et al. , 2009Burgh et al. 2010;Jenkins & Tripp 2011;Shull et al. 2021;Ritchey et al. 2023) and high redshift DLAs (Noterdaeme et al. 2018;Balashev et al. 2019;Srianand et al. 2005;Ledoux et al. 2003;Jorgenson et al. 2009Jorgenson et al. , 2010, respectively. Dashed lines show C i/H 2 ratios equal to -4, -5, -6, -7. Right panel: log (CI)/ (H 2 ) as a function of gas-phase metallicity. The symbols are the same as in left panel. balance in the medium since these levels are predominantly populated by collisions and 5 . The higher H 2 rotational levels (J ≥ 2) can be significantly populated by UV pumping and therefore may provide a direct measurement of the UV field. However, UV pumping is very sensitive to saturation of H 2 resonant lines (as well as the shielding does), and therefore is very sensitive to the exact geometrical model, which is impossible to constrain in observations towards one sightline. In turn, excitation of two lower rotational levels of H 2 is sensitive to the thermal balance in the bulk of the medium, which roughly densities, considered in this study, bulk of the medium represents region of the cloud, where H 2 is self-shielded, and hence significantly less biased by the exact geometry of the cloud and anisotropy of the UV field. Additionally, the column density of ground ortho and para levels usually significantly higher than J ≥ 2 levels, and typically show Lorentzian wings. This makes constraint of the column density less affected by choice of the exact velocity structure of the absorber (which is complicated in FUSE data) and the degeneration with the Doppler parameter. Finally, description of high H 2 rotational levels might require dynamical models in contrast to static Meudon PDR models used here. Indeed, J ≥ 2 can be significantly excited in the outer layers of the cloud (see e.g. Abgrall et al. 1992;Balashev et al. 2009), where H 2 is not yet self-shielded, and due to hydrodynamical motions this region can be larger then static models predict, see detailed discussion in Klimenko & Balashev 2020. In general, we found that taking into account H 2 (J ≥ 2) induces systematic increase in derived , that requires additional detailed studies. Following Klimenko & Balashev 2020;Kosenko et al. 2021 we obtained a region of H and values corresponding to fit to the measured column densities of J = 0, 1 levels of H 2 levels and C i fine-structure populations. We calculated two grids of constant hydrogen density models with metallicities corresponding to the average metallicities on the LMC and SMC. For each grid we varied log H (in units cm −3 ) and log (in units of Mathis field (Mathis et al. 1983)) in the ranges [0, 4.5] and [-1, 3], respectively, with the steps 0.5 for both log H and log . Note that Meudon PDR used the total hydrogen gas density H = (HI) + 2 (H 2 ), which close to the gas number density gas ≈ (HI) + (H 2 ) + (He) at low molecular fraction, but can be 2 about times higher for the fully molecular region. We also assumed the CRIR to be linearly scaled with UV field as log −16 = log , where −16 is a primary ionization rate of the hydrogen atom in the units of 10 −16 s −1 . We made this assumption since Bialy & Sternberg 2019;Balashev et al. 2022 showed that cosmic rays may impact much on the thermal state of the diffuse medium, especially at low metallicity. The linear dependence was taken for simplicity assuming that UV field and cosmic rays are both produced in the star-formation region and likely on average scaled with star-formation rate. For C i we used a relative population of levels, since the ionization state of carbon depends on the chemistry Here red diamonds are measurements in the LMC, blue squares are measurements in the SMC, green circles are QSO data (from the references provided in caption of Fig. 1) and yellow triangles are data in the MW (Jenkins & Tripp 2011). Model curves are calculated for the temperatures = 50, 100 and 200 K, and number densities in the range log = 0 − 5 assuming only atomic hydrogen ( H 2 = 0, solid curves) and full molecularized case ( H 2 = 1, dashed curves).
(and hence several physical parameters) and dust properties. In turn, excited C i fine-structure levels, i.e. C i * and C i * * , are mostly populated by the collisions (which determined by H and ), excitation by the CMB and pumping by UV radiation. However, the latter is typically dominated only at quite high values of UV field (see e.g. Balashev et al. 2019). An example of the constraints on H − derived from population of C i, low rotational levels of H 2 and joint analysis is shown in the Fig. 4. One can see that while individual constrains from C i and H 2 are significantly degenerated, they have different dependence in H − ( ) parameter space, and hence the joint constraint is much tighter than individual ones.
We applied the described method to the systems in the LMC and SMC to get constraints on H and (∝ ). We used results of H 2 fit in spectra obtained with FUSE telescope with resolution = /Δ ≲ 20000, which is much less then resolution for the most HST data used in this work. Therefore FUSE data does not allow to accurately resolve velocity structure as HST data does and we cannot unambiguously associate H 2 and C i components. Hence we used column densities summarized over all of the Magellanic Clouds components in our analysis. The results are summarize in Tables 3  and 4, and shown in Fig. 5, while the constraints on individual systems are presented in Appendix C. We found that the hydrogen gas densities derived in the LMC and SMC are consistent with the values corresponding to the diffuse cold ISM, ∼ 30 − 10 3 cm −3 , and with values measured in other H 2 -bearing absorption systems in the MW and high-DLAs. The average values of hydrogen gas densities in both the SMC and LMC are close, log H ≃ 2.5 with dispersion 0.4 for the LMC and log H ≃ 2.6 and with dispersion 0.6 for the SMC, respectively. Interestingly, that both the SMC and LMC sightlines indicate systematically higher UV field, than ones measured near Solar vicinity, which is in line with previous studies of Magellanic . Estimate on the hydrogen gas density and UV field intensity for the system towards Sk-67 5 in the LMC. The green, violet and red color show the constraints obtained using from C i, H 2 and joint analysis. Solid and dashed curves show 0.683 (1 ) and 0.954 (2 ) credible intervals for the posterior distribution function, respectively. On the top and left axis we show the marginalized 1d distribution of H and , respectively, where filled regions correspond to 1 estimates, and provide the estimated value in the attached text labels.
clouds (e.g. Bernard et al. 2008;Sandstrom et al. 2010;Welty et al. 2016;Roman-Duval et al. 2021). The mean value of UV field intensity is log ∼ 0.3 with a dispersion 0.5 for the SMC sightlines. This is lower than the mean value in the LMC sightlines ∼ 0.7 with dispersion 0.4. The columns are: (i) name of the star; (ii) estimated metallicity; (iii) species that is used to derive metallicity; (iv) the hydrogen gas density; (v) the UV field strength in the units of Mathis field; (iv) parameter (see Sect. 6.4). Upper limits were constrained from 3 credible interval Using obtained H 2 excitation temperatures and hydrogen densities we found that the thermal pressures 6 are on average log / ≃ 4.2 and 4.3 with dispersion of about 0.4 and 0.5 for the LMC and SMC, respectively.This is consistent with the values found by Klimenko & Balashev 2020 and by Jenkins & Tripp 2021 for both Magellanic Clouds (their log / ≃ 4.1 ± 0.5 and ≃ 4.0 ± 0.2, respectively) and Roman-Duval et al. 2021 for the LMC sample (their ≃ 3.9 ± 0.5). The columns are: (i) name of the star; (ii) estimated metallicity; (iii) species that is used to derive metallicity; (iv) the hydrogen gas density; (v) the UV field strength in the units of Mathis field; (vi) the cosmic ray ionization rate; (iv) parameter (see Sect. 6.4). Upper limits were constrained from 3 credible interval

Comparison with previous the LMC and SMC measurements
Most of the systems in the LMC have been studied by Roman-Duval et al. (2019, using HST data (in their course of METAL program). For almost all systems our measurements of C i and metals column densities agree with results of previous studies (some of disagreements are discussed above in Sect. 3.2). Roman-Duval et al. (2021) also estimated number density and in these systems. They used approach described by Jenkins & Tripp (2001, 2011, which is based on the analysis of the location of the measured ratios (C i * )/ (C i) total and (C i * * )/ (C i) total on the model tracks that themselves depend on gas , , and a fraction of low-pressure gas. In addition, the initial assumption about requires knowledge the C ii column density, which is difficult to constrain from observations, as HST spectra cover only two C ii lines, at 1334Å and 2334Å, where the first is strongly saturated and the second is weak. Therefore Roman-Duval et al. 2021 estimated (C ii) using (H i), which may lead to an additional uncertainty in UV field estimation because the fraction of H i associated with cold C i-bearing phase is not well known.
Following the approach used in this work (suggested by Balashev et al. 2019;Klimenko & Balashev 2020), it requires to know only H 2 rotational and C i fine-structure level populations, which were measured in HST and FUSE spectra and directly related to cold C ibearing phase. In almost all cases our results on UV field intensities are consistent with estimates obtained by Roman-Duval et al. 2021  Table 4) and previously by Klimenko & Balashev 2020, respectively. The red and violet diamonds correspond to measurements in the LMC found in this work (see Table 3) and previously by Klimenko & Balashev 2020  (except few systems), but number densities in about half of the sample have been found much higher. Some discrepancies in the UV field intensities may arise from different estimates of C i population of fine-structure levels, e.g. in the systems towards Sk-68 129, BI 253 and Sk-68 140 column densities of the C i ground state seem to be overestimated in Roman-Duval et al. 2021 therefore leading to the lower estimate of than ours. However, the discrepancy in the number density estimates is probably arisen from the difference of the methods. The molecular fraction for most of the systems in our sample is not large ( H 2 ≲ 0.3) so in the most cases difference between H (which is obtained by us) and gas (which is obtained by Roman-Duval et al. 2021) does not significantly bias the results 7 and can not explain observed discrepancy. Also one should note that we obtained H 2 column densities systematically higher than obtained by Welty et al. 2012 (see discussion in the Paper I), which may lead to the different excitation temperatures, since Roman-Duval et al. 2021 also used H 2 rotational temperature in their model and it may influence on their final results.

Comparison with Milky Way
In Fig. 5 we compare our results on and H with values found in the Milky Way, that were obtained by reanalysis the observed excitation of C i and H 2 following our method (Klimenko et al. in prep.) 8 . One can see that values of UV field intensity in both the LMC and SMC are higher than in our Galaxy, which is in line with previous studies (e.g. Bernard et al. 2008;Sandstrom et al. 2010;Welty et al. 2016;Roman-Duval et al. 2021). Moreover the dispersion in Magellanic Clouds as well are higher, than in the MW. This can be explained since the MW sightlines mostly probe a solar vicinity away from the active star-formation regions. In turn, for Magellanic Clouds there may be a selection effect -most of the stars are from star-forming regions, and hence if absorption system arisen from the nearby medium then it will be enhanced by local UV field. Also one can note that Magellanic Cloud systems probe the wider range of H 2 column densities, log (H 2 ) > 18, while in case of the MW we are limited mostly by systems with log (H 2 ) > 20. Finally, sightlines in Magellanic Clouds probe different metallicity than the MW ones. These difference may affect the heating/cooling balance 9 . 7 see note on the difference between H and gas in Section 5 and previous footnote in the following Section. 8 We find that on average values of derived by our method are 0.5 dex less than ones derived by Jenkins & Tripp 2011, while estimates on H are well consistent. However above we already discussed some limitations of the model, presented by Jenkins & Tripp 2001, 2011, and to be consistent in the comparison between the samples, we reanalysed sightlines from Jenkins & Tripp 2011 by method used in this paper. 9 Indeed, the cooling of the CNM is mostly by fine-structure line emission which is linearly scaled with gas phase elemental abundance, that depends Our measurements indicate that thermal pressures in the LMC and SMC close to 4.1 ± 0.4 that was obtained by Klimenko & Balashev 2020 in local ISM. However, note that sightlines from the sample of Klimenko & Balashev 2020 likely probe translucent phase of the cold ISM, while systems in our sample are likely related to diffuse phase, in terms of molecular carbon fraction and the cooling function. The thermal pressures in the reanalysed MW sample from (Jenkins & Tripp 2011) is found to be ∼ 3.7 ± 0.2, that is slightly lower than what we found in the SMC and LMC samples.

Comparison with H 2 -bearing DLAs at high z.
While the enhanced values of UV field that we found in Magellanic Clouds are consistent with some values measured at high redshifts DLAs, on average the hydrogen gas density and UV field strength determined at high redshifts are systematically lower than what we obtained in the SMC and LMC. This is likely due to the selection effects. First, high redshift DLAs probe the population of the field galaxies, which may have lower star-formation rate, than SMC and LMC. Second, in case of the SMC and LMC we probe the central star-forming region of the galaxies, while in case of quasar absorption lines we mostly probed the periphery of the distant galaxies due to large cross-section of these regions. Indeed, it was found that in a case of H 2 -bearing DLAs thermal pressures and number densities increase with the increase in the total hydrogen column density (Balashev et al. 2017(Balashev et al. , 2019, which likely anticorrelates with the impact parameter (Krogager et al. 2017;) and therefore the distance to star-forming regions. In that sense the LMC and SMC data should be compared with the hydrogen gas densities measured in the extremely saturated DLAs and towards GRB sightlines (Ranjan et al. 2020). The latter are represented by only in a few cases (see e.g. Balashev et al. 2017;Ranjan et al. 2018), where the measurements of H are consistent with average values in the LMC and SMC. With addition of relatively low metallicities, this indicates that the LMC on metallicity. The heating mostly determined (see e.g. Bialy & Sternberg 2019) by cosmic ray heating, whose rate doesn't depend on the metallicity, and photoelectric heating, whose rate is scaled with dust to gas ratio, that can be non-linearly scaled with metallicity (Rémy-Ruyer et al. 2014;Balashev et al. 2022). Finally, the decrease of dust to gas ratio increase the gas phase abundance of elements. and SMC may be used as an interesting test case for studies of the central parts of the high-redshift galaxies.

Thermal state
In static equilibrium the temperature of the ISM is determined from the thermal balance of the heating and cooling rates. Consequently in most simplest situation the temperature should depend on the ratio of log / H (or / H , note, that we tight together and ). In Fig. 6 we compare the obtained / H and 01 in different samples. Previously, Klimenko & Balashev (2020) reported that observationally / H ∝ and actually there may be a correlation between 01 and / H , for which we get a power law index = 1.6 +1.3 −1.1 and 2.2 +1.4 −1.3 for the LMC and SMC, respectively. However, the correlation is very weak (if it is real) -Pearson correlation coefficients are 0.08 with p-value 0.69 and 0.14 with p-value 0.54 for the LMC and SMC, respectively.
Interestingly, that parameter 10 that was introduced for description of the H i/H 2 transition also depends on / H ratio, apart from the metallicity dependence. Since the metallicities are also constrained in our sample, we provide parameter 11 for the LMC and SMC samples in Tables 3 and 4, respectively. In Fig. 7 we compare the dependence of on H 2 column densities, measured in different systems. One can see that in case of Magellanic Cloud sample we obtained a large range of : ∼ 0.2 − 13 and ∼ 0.2 − 50, for the LMC and SMC, respectively, while in the MW sample it is constrained to lie within ∼ 0.1 − 1. Higher values of in the LMC and SMC samples are consistent with that we measured in the high-redshift systems, ∼ 0.5−40. This can be connected with a higher value of UV field intensity and lower metallicity in both Magellanic Clouds and distant galaxies, leading to a lower H 2 abundance. Interestingly, that we also found a strong correlation of parameter with H 2 column density in our sample: Pearson correlation coefficients are 0.67 with p-value 2 × 10 −4 and 0.39 with p-value 0.05 for the LMC and SMC, respectively. This likely indicates that higher H 2 column density systems in Magellanic Clouds probe the gas closer to the star-formation regions, where UV field is enhanced. This is directly confirmed by considering estimates of UV field obtained in our sample. On the other hand, Fig. 8 shows that in the LMC and SMC samples, the relative abundance C i/H 2 anti-correlates with the strength of UV field, and even more strongly with the ratio of / H ∝ . The correlation coefficient is −0.66 and p-value 2 × 10 −4 for the LMC and −0.19 and p-value 0.35 for the SMC. This is in general in line with chemical models of diffuse ISM (e.g. Wolfire et al. 2008;Liszt 2015), and will be comprehensively explored in forthcoming paper (Balashev et al. in prep).
We also show how our estimated results on physical condition are located on the phase diagram of the thermal state of the cold ISM. The phase diagrams for the four bins of , and associated measured values are shown in Figs 9 and 10, for average values of metallicity in the LMC and SMC, respectively. In fact, to derive H and UV flux we already used calculation of thermal state using Meudon PDR code. Therefore these phase diagrams are mostly shown for an illustrative purpose only, to highlight that the thermal state of the medium depends on the physical parameters, like and , as 10 Following (Sternberg et al. 2014;Bialy & Sternberg 2016), parameter is a ratio of H 2 destruction rate (neglecting self-shielding) to the H 2 formation rate and defines the shielding of H 2 from UV radiation 11 To estimate parameter we used approximation of Bialy & Sternberg 2016, where we used H 2 formation rate to be = 3 × 10 −17 g cm 3 s −1 , where g depends on dust properties and close to unity (Sternberg et al. 2014) well as on the properties and abundance of dust. To calculate the phase diagram we used the same code and similar assumptions on the heating and cooling sources of the medium as it was recently done in Balashev et al. 2022. One can see that our calculations in general agree with Meudon PDR ones that are indirectly reflected by the location of the measured points. On average, Meudon PDR gives slightly higher temperature of the ISM, at lower values of and higher metallicity. This may be due to different scaling of the dust to gas ratio parameter depending on metallicity, the actual behaviour of which is very hard to constrain from observations (see e.g. Rémy-Ruyer et al. 2014).

SUMMARY
Using HST archival data we analysed C i absorption lines and obtained populations of fine-structure levels in 21 and 23 systems in the LMC and SMC, respectively. In the most of these systems we also analysed metal lines and measured metallicities to be log = −0.66 ± 0.22 and −0.99 ± 0.19 (providing an average value and standard deviation) for the LMC and SMC, respectively.
Using the obtained C i fine-structure level populations and populations of H 2 rotational levels previously reported in accompanying paper (Kosenko & Balashev 2023) we constrained physical conditions in the systems, namely, hydrogen gas density and UV field intensity (or cosmic ray ionization rate assumed to be coscaled with UV field). The average values of hydrogen gas densities are log H ∼ 2.5 and log H ∼ 2.6, with standard deviation 0.4 and 0.6, for the LMC and SMC, respectively. The mean intensities of UV field are log LMC ∼ 0.7 and log SMC ∼ 0.3 (in units of Mathis field) with standard deviation of 0.4 and 0.5, for the LMC and SMC, respectively. We also estimated the average thermal pressure in our sample to be log LMC ∼ 4.2 and log SMC ∼ 4.3 with standard deviation 0.4 and 0.5 for the LMC and SMC, respectively.
We compared the obtained hydrogen gas densities and thermal pressures in Magellanic Clouds with measurements in the Milky-Way and high-DLAs. The average thermal pressure in Magellanic Clouds is half an order of magnitude higher than thermal pressure measured in C i absorption systems in the Milky-Way log MW ∼ 3.7 ± 0.2. Such high values of thermal pressure were observed in strong CObearing MW clouds (Welty et al. 2020;Federman et al. 2021), which represent translucent/dense phase of the ISM. This difference can be explained by lower metallicities and higher UV field/CRIR intensity in the Magellanic Clouds than in the MW samples, which is directly confirmed by our data and in line with previous studies (e.g. Bernard et al. 2008;Welty et al. 2016). In that sense, Magellanic Clouds absorption systems probe ISM at sufficiently different regime than MW do and provide interesting test-case for the studies of high redshift galaxies. This also agree with some similarities of obtain physical parameters in the Magellanic Clouds and high redshift absorption systems, although the latter likely predominantly probe an outskirts of the galaxies due to their higher cross section.

DATA AVAILABILITY
The results of this paper are based on open data retrieved from the FUSE and HST telescope archives. These data can be shared on reasonable requests to the authors.                                                            CI** 1561.43 Figure A29. C i absorption lines fit in the system towards Sk-68 155 in LMC. Lines are the same as in Figure A1.            CI** 1277.55 Figure A34. C i absorption lines fit in the system towards AV 47 in the SMC. Lines are the same as in Figure A1 +2 2 0.5                   captionC i absorption lines fit in the system towards AV 170 in the SMC. Lines are the same as in Figure A1 +2 2 0.5    CI** 1561.43 Figure A42. C i absorption lines fit in the system towards AV 207 in SMC. Lines are the same as in Figure A1 +2 2 0.5                                     CI** 1277.55 Figure A57. C i absorption lines fit in the system towards Sk 191 in the SMC. Lines are the same as in Figure A1

APPENDIX B: DETAILS ON METAL LINES FIT
In this section we show the fit to metal line profiles which are used to estimate metallicities in the systems discussed in the Section 5. ZnII 2062.66 Figure B1. Zn ii absorption lines fit in the system towards Sk-67 2 in the LMC. Lines are the same as in Figure                                           Lines are the same as in Figure A1

APPENDIX C: DETAILS ON CONSTRAINTS OF n H AND
In this section we present the constraints for each individual sightline on the number density and UV field (or CRIR) using the excitation of C i fine-structure levels and two lowest rotational levels of H 2 . The joint constraints are summarize in Tables 3 and 4 for the LMC and SMC, respectively Figure C1. Estimate on the number density and UV field intensity for the system towards Sk-67 2 in the LMC. Lines are the same as for Figure 4. Figure C2. Estimate on the number density and UV field intensity for the system towards Sk-67 20 in the LMC. Lines are the same as for Figure 4. Figure C3. Estimate on the number density and UV field intensity for the system towards PGMW 3070 in the LMC. Lines are the same as for Figure 4. Figure C4. Estimate on the number density and UV field intensity for the system towards LH10 3120 in the LMC. Lines are the same as for Figure 4. Figure C5. Estimate on the number density and UV field intensity for the system towards PGMW 3223 in the LMC. Lines are the same as for Figure 4.                          . Estimate on the number density and UV field intensity for the system towards AV 47 in the SMC. Lines are the same as for Figure 4. Figure C32. Estimate on the number density and UV field intensity for the system towards AV 69 in the SMC. Lines are the same as for Figure 4. Figure C33. Estimate on the number density and UV field intensity for the system towards AV 75 in the SMC. Lines are the same as for Figure 4. Figure C34. Estimate on the number density and UV field intensity for the system towards AV 80 in the SMC. Lines are the same as for Figure 4. Figure C35. Estimate on the number density and UV field intensity for the system towards AV 81 in the SMC. Lines are the same as for Figure 4. Figure C36. Estimate on the number density and UV field intensity for the system towards AV 207 in the SMC. Lines are the same as for Figure 4. Figure C37. Estimate on the number density and UV field intensity for the system towards AV 210 in the SMC. Lines are the same as for Figure 4. Figure C38. Estimate on the number density and UV field intensity for the system towards AV 215 in the SMC. Lines are the same as for Figure 4. Figure C39. Estimate on the number density and UV field intensity for the system towards AV 216 in the SMC. Lines are the same as for Figure 4. Figure C40. Estimate on the number density and UV field intensity for the system towards AV 266 in the SMC. Lines are the same as for Figure 4. Figure C41. Estimate on the number density and UV field intensity for the system towards AV 372 in the SMC. Lines are the same as for Figure 4. Figure C42. Estimate on the number density and UV field intensity for the system towards AV 476 in the SMC. Lines are the same as for Figure 4. Figure C43. Estimate on the number density and UV field intensity for the system towards AV 479 in the SMC. Lines are the same as for Figure 4. Figure C44. Estimate on the number density and UV field intensity for the system towards AV 488 in the SMC. Lines are the same as for Figure 4. Figure C45. Estimate on the number density and UV field intensity for the system towards AV 15 in the SMC. Lines are the same as for Figure 4. Figure C46. Estimate on the number density and UV field intensity for the system towards Sk 191 in the SMC. Lines are the same as for Figure 4.