Data-driven Model of Temporal Evolution of Solar Mg ii h and k Profiles over the Solar Cycle

The solar radiation in the cores of the Mg ii h and k spectral lines plays a significant role in the illumination of prominences, coronal mass ejections (CMEs), spicules, flare loops, and surges. Moreover, the radiation in these lines strongly correlates with solar magnetic activity and the ultraviolet solar spectral irradiance affecting the photochemistry, especially of oxygen and nitrogen, in the middle atmosphere of the Earth. This work provides a data-driven model of temporal evolution of the solar full-disk Mg ii h and k profiles over the solar cycle. The capability of the model to reproduce the Mg ii h and k profiles for an arbitrary date is statistically assessed. Based on selected 76 IRIS near-UV full-Sun mosaics covering almost the full solar cycle 24, we find the parameters of double-Gaussian fits of the disk-averaged Mg ii h and k profiles and a model of their temporal evolution parameterized by the Bremen composite Mg ii index. The model yields intensities within the uncertainties of the observed data in more than 90% of the reconstructed profiles assuming a statistically representative set of Bremen Mg ii index values in the range of 0.150–0.165. The relevant full-disk Mg ii h and k calibrated profiles with uncertainties and spectral irradiances are provided as an online machine-readable table. The model yields Mg ii h and k profiles representing the disk incident radiation for the radiative-transfer modeling of prominences, CMEs, spicules, flare loops, and surges observed at arbitrary time.

The resonance lines Mg II h (2803.53 Å) and Mg II k (2796.35 Å) provide important diagnostic tools for these structures and their disk profiles represent a significant source of external illumination. The archive 4 of the Interface Region Imaging Spectrograph (IRIS; De Pontieu et al. 2014) offers a wealth of observations of on-disk and off-limb structures ). Their precise modeling requires specification of actual background or incident radiation at the moment of data acquisition. The IRIS full-Sun mosaics, primarily used for quasi-regular monitoring of changes in instrument sensitivity, can be also employed for definition of incident radiation from the solar disk. Recently, such a mosaic provided the incident Mg II h and k profiles for prominence modeling by Zhang et al. (2019) and Vial et al. (2019).
But the IRIS mosaics have much broader application. Investigating the chromospheric footpoints of the solar wind, Bryans et al. (2020) analyzed three Mg II h mosaics. They demonstrated significant spectral variation within the chromospheric plasma of coronal holes. The spectral differences outline the boundaries of some-not all-coronal holes and point to a chromospheric source for the inhomogeneities found in the fast solar wind. Ayres et al. (2021) used the IRIS full-disk mosaics in a study of the solar-stellar connection. They showed that the IRIS C II (T ∼ 10 4 K), Si IV (8 × 10 4 K), and Mg II (8 × 10 3 K) Sun-asa-star profiles compare well to tracings of solar-twin α Centauri A (G2 V). As far as the solar-stellar connection is concerned (1) the chromospheric and transition zone lines are progressively more associated with surface magnetic features (network lanes and plages) as the formation temperature T rises, and (2) even at the magnetic cycle minimum, all the IRIS reference lines have significant emission from the supergranulation network.
The Mg II h and k intensities, observed on the solar disk, vary considerably between different observed structures (Schmit et al. 2015), with distance from the disk center (Gunár et al. 2021), and also with the solar cycle. In general, variation in the solar spectral irradiance (SSI) drives short-timescale changes in the middle atmosphere of the Earth, and on longer timescales it influences the Earthʼs climate (Floyd et al. 2002;Snow et al. 2019). In particular, changes in the 2000-3000 Å region of the solar spectrum involving the Mg II h and k lines control the creation and destruction of ozone (Heath & Schlesinger 1986;Snow et al. 2019). Heath & Schlesinger (1986) defined the Mg II center-to-wing ratio (also known as the Mg II index) as an easily measured proxy for solar magnetic activity and relevant ultraviolet SSI variability. The ratio of the irradiances in the centers of the Mg II h and k lines to the irradiances in the nearby continua (i.e., the ratio of the chromospheric contribution to the photospheric contribution) on either side produces a dimensionless quantity that is highly correlated to SSI variability throughout the ultraviolet spectral range. Some of the primary advantages of such a relative measurement-rather than an absolute measurement-are that it is fairly easy to obtain and that most instrument artifacts that affect both center and wings cancel each other out. Snow et al. (2019) revised this assumption concluding that degradationcorrected data are better but that uncorrected data still produce a highly accurate Mg II index. As a test case they used highresolution spectral measurements obtained by the Solar-Stellar Irradiance Comparison Experiment (SOLSTICE; McClintock et al. 2005aMcClintock et al. , 2005b on board the Solar Radiation and Climate Experiment (SORCE; Anderson & Cahalan 2005;Rottman 2005) covering the period from the end of 2003 to the end of 2017 (i.e., the declining phase of solar cycle 23 and most of solar cycle 24). They found that uncorrected data would produce an error in the Mg II index that is less than 0.6% of the solar cycle amplitude over a decade. Using corrected data, that error decreases by a factor of 5 to about 0.1% of the solar cycle amplitude. It proves the relative insensitivity of the Mg II index to instrumental degradation. The Mg II index has a long history of daily measurements reviewed in Snow et al. (2014Snow et al. ( , 2019, as well as several published long-term composites. For example, the University of Bremen maintains the widely used Bremen composite magnesium II index (Snow et al. 2014), hereafter referred to as the Bremen Mg II index or BI, of which the daily values from 1978 November 7 to the present are available online.
To take properly into account the significant temporal variability of Mg II h and k line radiation from the solar disk in radiative-transfer modeling of chromospheric and coronal structures, disk-averaged profiles should be taken quasi-cotemporally with observations of the studied structures. However, this is almost impossible and thus to compensate for the absence of actual full-disk Mg II h and k profiles a model of their cyclic evolution is needed allowing one to reconstruct them for arbitrary dates. This problem is solved for the Lyα line in Kowalska-Leszczynska et al. (2018 and Gunár et al. (2020). They presented models of temporal evolution of the full-disk Lyα line profile driven by the composite Lyα index, i.e., the disk-and wavelength-integrated Lyα spectral irradiance. Although both models use the same driver they differ much in input Lyα data, scopes of applicability, and complexity of reconstruction of the spectral shape of Lyα. Construction of the model in the latter work was primarily aimed at application in radiative-transfer modeling. Because there does not exist an index for the Mg II h and k lines equivalent to the composite Lyα index (i.e., a disk-and wavelength-integrated Mg II spectral irradiance) the Bremen Mg II index is a potential driver representing SSI variability in a model of cyclic evolution of the full-disk Mg II h and k profiles.
In the present work, we use a series of 91 IRIS full-Sun mosaics obtained over solar cycle 24 and select 76 mosaics to construct a state-of-the-art model of temporal evolution of cores of the solar full-disk Mg II h and k profiles driven by the Bremen Mg II index. We check and discuss the performance and fidelity of the new model. To facilitate its utilization the corresponding routines, written in IDL, are made publicly available. 5 Their description is given in Section 4.4. Finally, we provide the 91 disk-averaged intensity profiles with uncertainties in units of W m −2 sr −1 nm −1 and mW m −2 sr −1 Hz −1 and the spectral irradiances at 1 au with uncertainties in units of mW m −2 nm −1 , showing the temporal variations of the Mg II h and k cores in solar cycle 24, in machine-readable format online. This work is complementary to our previous works on the quiet-Sun reference Lyα, Mg II h, and Mg II k line profiles presented in Gunár et al. (2020) and Gunár et al. (2021, hereafter, Paper I).

IRIS Full-Sun Mosaics
An important aspect of operating spaceborne instruments is regular monitoring of changes in the instruments' sensitivity over their lifetimes. In the case of the IRIS instruments it is achieved by a quasi-regular acquisition of spectral maps of the entire solar disk in both the near-UV (NUV) and far-UV spectral ranges and comparison with cotemporal measurements by SORCE/SOLSTICE (Wülser et al. 2018) or the Solar EUV Experiment (Woods et al. 2005) on board the Thermosphere Ionosphere Mesosphere Energetics and Dynamics spacecraft. We refer to the IRIS full-disk NUV spectral maps as the IRIS full-Sun mosaics or just mosaics.  (14), 2020 (14), 2021 (10), and 2022 (4). The footnote web address of the IRIS mosaic archive is up to date and those in Paper I are outdated though the data should be the same (B. De Pontieu 2021, private communication). The only difference is that the up-to-date address offers the mosaics in compressed files.
In a typical year the first mosaic is usually taken at the end of February and the last one at the end of October (i.e., outside the IRIS eclipse season of November to February) except in the years 2013 and 2014, when the first was taken in September and March, respectively. The source spectra of the mosaics are binned along the slit with binning factors of 2 (76 mosaics) and 4 (15). The spectra are binned along the dispersion (i.e., along the wavelength range) with factors of 2 (76 mosaics) and 4 (15), yielding spectral scales of 51.2 mÅ px −1 and 102.4 mÅ px −1 , respectively, and spectral resolutions of 106 mÅ and 212 mÅ, respectively (De Pontieu et al. 2014, Table 1). By default the mosaic processing code spectrally rebins Level 2 data to a default value 6 of spectral scale of 35 mÅ px −1 common for all mosaics disregarding the original spectral binning. Thus the spectral range of 3.5 Å, covered by each mosaic, is sampled by 101 points.
In this paper we utilize the same data in Paper I, i.e., 91 mosaics spanning the period from 2013 September 30 to 2020 October 19. Details on observational characteristics of the mosaics, their processing, their radiometric calibration, and their uncertainties can be found in Paper I. The Solar Influences Data Analysis Center (SIDC) 7 defined the minimum, the maximum, and the end of solar cycle 24 for 2008 December, 2014 April, and 2019 December, respectively. These dates will be relevant when referring to the aspects of solar cycle 24. Figure 1 shows examples of mosaics in the Mg II k line center  Figure 2. An inspection of disk-averaged profiles from the years of low solar activity 2019-2020 shows that they practically coincide with that from 2019 October 20. However, Figure 2 clearly demonstrates that during high solar activity the variation of the full-disk profiles is more pronounced. It illustrates that a full-disk profile measured on a day of high solar activity is not representative of a time span of weeks or even an entire Carrington rotation. Figure 2 also illustrates an effect of spectral binning 4 on a resulting disk-averaged profile. While the profiles from 2014 March 17 and 24 and 2019 October 20 (in orange, red, and blue, respectively) are constructed from mosaics taken with spatial and spectral binning 2 the quiet-Sun profiles from 2019 October 15 (in purple) are constructed from mosaics with binning 4. Although an extremely low level of solar activity is common for both days the effect of binning on the line shapes from 2019 October 15 is significant as compared to the profiles from October 20.

Data Availability
A short example of data entering this analysis is given in Table 1. The table is published in its entirety in machine-readable format. A portion is shown here for guidance regarding its form and content. The wavelength separation Δλ is centered at rest wavelengths 280.3530 and 279.6352 nm of the Mg II h and k lines, respectively. The example table lists the specific intensities I and spectral irradiances E e of the disk-averaged Mg II h and k profiles with some characteristics of IRIS full-Sun mosaic Nos. 76 and 77 taken on 2019 October 15 and 20 (shown in Figure 2 where   N and au represent the nominal values of the solar radius and astronomical unit, respectively, and I is the diskaveraged intensity shown in Columns (a) and (b).

Bremen Mg II Index
The values of the Bremen Mg II index are listed at the LASP Interactive Solar Irradiance Data Center (LISIRD) 8 operated at the Laboratory for Atmospheric and Space Physics at a daily cadence but they are not daily averages. Actually, the measurements are taken during a fraction of a day. The upto-date minimum and maximum values of the index are 0.14947 ± 0.00062 and 0.18005 ± 0.00268 for 1985 December 2 and 1979 November 10, respectively.
We already pointed out in Section 2.1 that a disk-averaged Mg II h or k profile measured on a day of high solar activity is (This table is available in its entirety in machine-readable form.)  Figure 3). It means that an off-limb structure observed on a day of high activity may experience an incident solar disk radiation different from that when the structure is close to a visible disk center. Thus, in the modeling of an off-limb structure the disk-averaged Mg II h and k profiles, dated roughly one week prior to or subsequent to observation of the structure at the west or east limb, respectively, are relevant (see Sections 4.4 and 8).

Correlations
To be able to reconstruct disk-averaged Mg II h and k profiles for arbitrary dates our model needs a suitable driver for which temporal variations well reflect the SSI variability in time. In this section we assess the suitability of the Bremen Mg II index as a driver of the sought model. We examine the relations between the index and some characteristics of the IRIS disk-averaged Mg II h and k profiles illustrated in Figures 3, 4, 5, and A1.
To facilitate quick recognition of results pertaining to the Mg II h and k lines, we use for them the red and blue colors, respectively, in Figure 3 and all following figures in this article, if relevant. Also we will keep a uniform layout of multipanel figures placing Mg II h-and k-relevant panels on the left and right, respectively.  Table 2 lists the coefficients of linear fits of the intensities E(Mg II h) and E(Mg II k) integrated over the intervals of 1.0 and 3.5 Å. The correlation coefficients larger than 0.9 in the last column confirm a very good correspondence between the integrated intensities of the emission cores and the  . Correlations between Bremen Mg II index and the ratio between averaged peak intensities and center intensities of the IRIS disk-averaged Mg II h (red) and Mg II k (blue) line profiles. The data correspond to the IRIS mosaics taken with spatial and spectral binnings 2 (empty circles) and 4 (filled circles).

Bremen Mg II Index versus IRIS Integrated Intensities
Bremen Mg II index. We note that from here on we use values of the Bremen Mg II index interpolated to the start time of acquisition of the individual IRIS mosaics.

Bremen Mg II Index versus Ratio of Peak Intensity to Center Intensity
A more complex view renders the comparison of the index with the ratio of the peak intensity to the center intensity 0.5(I h2v + I h2r )/I h3 and 0.5(I k2v + I k2r )/I k3 shown in Figure 5. Here, I h2v , I h2r , I k2v , and I k2r represent the intensities of the violet and red peaks of the disk-averaged Mg II h and k profiles and I h3 and I k3 stand for their center intensities. The range of the x-axis is intentionally set to 0.149−0.180 corresponding to the full range of measured values of the Bremen Mg II index (Section 2.3). Figure 5 shows a strong bifurcation of the ratios for binnings 2 and 4 and suggests an anticorrelation between the ratio and the Bremen Mg II index. This means that days with high index values and with bright active regions, covering large portions of the solar disk, have lower ratios than quiet-Sun days with small index values. This is quite understandable as the brightness of active regions increases the I h3 and I k3 intensities as compared to quiet-Sun days, when they are absent. But most importantly, the correlation coefficients of the index and the binning 2 ratios (empty circles in Figure 5) are in fact −1 for both Mg II h and k. This suggests that the Bremen Mg II index perfectly represents both the wavelength-integrated intensities of the disk-averaged Mg II h and k profiles and the variations of their spectral features. The anticorrelation of the index and the peak-to-center ratio is documented and analyzed in detail by the Solar Bayesian Analysis Toolkit (SoBAT; Anfinogentov et al. 2021) in Appendix A.
Conclusively, the online availability and the high correlations with the wavelength-integrated intensities and the peakto-center ratios of the IRIS disk-averaged Mg II h and k profiles stimulate us to adopt the Bremen Mg II index as the driver of the new model. But we will check carefully its ability to specify spectral shapes of disk-averaged Mg II h and k profiles in Section 5 as the most important feature of the model.

Model Construction
We aim to provide an easily parameterized model that is capable of reproducing double-peaked emission cores of Mg II h and k profiles with central reversal and with different peak intensities (peak asymmetry) in a 3.5 Å wide spectral window captured by IRIS mosaics. In constructing a new model of cyclic evolution of the solar disk-averaged Mg II h and k profiles we build on the methods presented in Schmit et al. (2015) and Kowalska-Leszczynska et al. (2018). The uncertainties of observed intensities (Paper I) are consistently considered throughout the model construction in relevant fitting processes.

Double-Gaussian Fit of the Solar Mg II h and k Lines
Initially, to model the 91 disk-averaged Mg II h and k profiles we test a nine-parameter subtractive double-Gaussian model function, represented by Equation (1) in Schmit et al. (2015). For the fitting the SolarSoft function mpfitfun.pro is used. The function calls the core procedure mpfit.pro, which performs a Levenberg-Marquardt least-squares minimization of merit function (Moré 1978;Moré & Wright 1993;Markwardt 2009). We find out that the model function involving Gaussians with positive and negative amplitudes does not yield a satisfactory and accurate fit of many observed profiles. Therefore, we choose an additive double-Gaussian function also with nine parameters, which sums two Gaussians superimposed on a background represented by a linear function. The model function is of the form where A i , Δλ i , and σ i stand for the peak amplitudes, positions, and widths of the two Gaussian components and the parameters a, b, and c represent the shape of the background. The components and parameters of the model function are schematically illustrated in Figure 6. Also shown is the common marking of the prominent spectral features I 1 , I 2 , and I 3 of the Mg II h profile (h) in its violet (v) and red (r) portions. The same goes for Mg II k identified with (k).
To avoid the Mn I 2801.907 Å line in the violet wing of Mg II h ( Figure 7) the fitting is limited within the wavelength range of −1.475 Å to 1.7 Å around the Mg II h line center. The entire wavelength range of ±1.75 Å is considered in fitting Mg II k including the weak line Mn I 2795.641 Å in its violet wing ( Table 2 in Pereira et al. 2013). We find out that the latter does not interfere with the fitting process and does not bias the final results.
To enhance the accuracy of final fits at the local extremes I 2 and I 3 we introduce weighting of the input intensities in the merit function. Weights of 100 are assigned to the extreme intensities giving them in the fitting process much higher importance than that given to other spectral points. In general, this approach renders very satisfactory results exemplified in Figure 7 together Table 2 Parameters of the Linear Fit y = q + kx and the Correlation Coefficients (CC) between the Disk-averaged Integrated Intensities E(Mg II h) and E(Mg II k) and the Bremen Mg II Index in Figure 4 Spectral Line with the uncertainties of the observed intensities. The fitting by Equation (2) yields 91 × 9 resulting parameters.

Model of Evolution of the Solar Mg II h and k Profiles
As a result of fitting individual profiles, we obtain 91 sets of parameters, each describing different Mg II h and k profiles observed by IRIS in different phases of solar cycle 24 characterized by the Bremen Mg II index. The values of the fitting parameters for the Mg II h and k lines are shown in Figures 8 and 9, respectively, as functions of the index. The magnitudes of their uncertainties, obtained from the fitting in Section 4.1, are comparable to or smaller than the size of the circles. The figures intentionally discriminate between parameters of profiles with binnings 2 (black empty circles) and 4 (gray filled circles). Apparently, the parameter values are split into two subsamples depending on the binning. Because binning 4 strongly modifies the intensities of local extremes I 2 and I 3 , as already shown in Figure 2, and consequently bifurcates the sample of parameter values (Figures 8 and 9), only the parameters of 76 profiles with binning 2 are considered in constructing the model. The model parameter values in Figures 8 and 9 clearly show a correlation with the Bremen Mg II index. We see that the correlation of all parameters with the index in the shown range of values 0.150−0.165 can be approximated by a linear function. We fit each of the nine parameters P i (i = 1...9) with the linear function P i = α i + β i BI, where P i = {A 1 , Δλ 1 , σ 1 , A 2 , Δλ 2 , σ 2 , a, b, c}, α i and β i represent the fit parameters listed in Table 3, and BI is the Bremen Mg II index. The fits are shown in Figures 8 and 9 by the red and blue lines, respectively. Conclusively, the set of the

Peak Amplitudes A 1 and A 2 and the Parameter c
Closer inspection of the evolution of peak amplitudes A 1 and A 2 (top left and middle left panels of Figures 8 and 9) reveals distinct changes with increasing solar activity-namely a rise of violet peak amplitude ΔA 1 of approximately 50 W m −2 sr −1 Å −1 is followed by a rise of red peak amplitude ΔA 2 of about 70-100 W m −2 sr −1 Å −1 . Thus, growth of activity decreases asymmetry in peak intensities. We can also observe a redshift of the parameter c toward zero with increasing activity in the bottom right panels of Figures 8 and 9. This effect may be due to the symmetrization of the entire profile with the center of gravity being identified with the parameter c and not with the zero-point of the relative wavelength scale.

Availability of the IDL Routines
To facilitate utilization of the presented model in retrieving disk-averaged Mg II h and k profiles for any date starting from 1987 November 7 9 and for any position on the solar disk the IDL procedures get_mgii_hk.pro and get_mgii_hk_-when_at_meridian.pro with auxiliary IDL routines are made publicly available at https://github.com/jkidl/IRIS. The routines require IDL version 8.2.1 or higher and installation of the SolarSoft package (Freeland & Handy 1998, 2012. For a given date the procedure get_mgii_hk.pro returns in an output structure (i) Mg II h and k specific intensities in units of W m −2 sr −1 Å −1 and mW m −2 sr −1 Hz −1 , (ii) Mg II h and k spectral irradiances at 1 au in units of mW m −2 nm −1 , and (iii) the Bremen Mg II index and its uncertainty adopted from the LISIRD database.
The second routine get_mgii_hk_when_at_meridian.pro takes into account the heliocentric Cartesian coordinates (Thompson 2006) of an off-limb or on-disk structure on the date and time of its observation and returns the disk-averaged Mg II h and k profiles on the date when a potential counterpart of the structure is at the central meridian. The routine relies on the synodic rotation coefficients determined from small magnetic features by Howard et al. (1990). After finding the date at the meridian the routine calls get_mgii_hk.pro and returns an output structure with the same quantities specified in items (i)-(iii) in the previous paragraph. The heliocentric Cartesian coordinates of a structure can be found by the visualization tool JHelioviewer by Müller et al. (2017). Alternatively, they can be found by the IDL routine sdo_featurelocator.pro or gong_featurelocator.pro in the IDL library rridl developed by R. J. Rutten. 10,11 For example, for the quiescent prominence with off-limb heliocentric Cartesian coordinates (x, y) = (818″, Figure 8. Correlations between the Bremen Mg II index and the parameters of the double-Gaussian model (Equation (2)) obtained by fitting Mg II h profiles with spectral binnings 2 (black circles) and 4 (gray filled circles). The size of parameter uncertainties is comparable to or smaller than the size of the circles. The solid lines are linear fits of the parameters of the Mg II h profiles (Table 3) with spectral binning 2. They represent the model of evolution of Mg II h profiles in solar cycle 24. 9 Start date of the Bremen Mg II index in the LISIRD database. 10 https://robrutten.nl/Recipes_IDL.html 11 https://robrutten.nl/rridl/00-README/sdo-manual.html 597″) observed at the western limb on 2013 October 22 at 7:30 UT the disk-averaged Mg II h and k profiles from 2013 October 15 are relevant. Because the coordinates are ad hoc slightly off-limb, the routine uses their radial projection (778″, 568″) back to the nearest point on the limb. The date when a counterpart of the structure is at the meridian can be found also by the JHelioviewer itself and then entered into get_ mgii_hk.pro.

Model Accuracy
In checking the accuracy of the new model we utilize a great asset of IRIS data, which is the availability of all inputs for reliably estimating uncertainties of IRIS intensities (Paper I). The performance of the new model is demonstrated in Figure 10, where the observed IRIS profiles, the same as those in Figures 2  and 7, are overplotted with the model functions (Equation (2)) whose parameters are computed by the coefficients α and β in Table 3  To answer these questions we construct three histograms (shown in Figures 11-13) allowing us to assess the new model statistically.
The histogram in Figure 11 shows the number of occurrences of reconstructed Mg II h and k profiles with the typical deviation of model intensities Δ typ across the entire fitting range given by the formula  (2)), respectively, at spectral position Δλ i within the full-disk profile on date t. The value of σ obs (Δλ i , t) is the uncertainty of intensity at spectral position Δλ i and N is the number of spectral positions considered in the double-Gaussian fitting, namely 91 and 101 for Mg II h and k, respectively (see Section 4.1). Due to normalization with respect to N and σ obs (Δλ i , t), the values of Δ typ (t) show whether l D ( ) I t , i mod is typically within the uncertainty interval, |Δ typ | 1, or outside it with |Δ typ | > 1. The histogram in Figure 11 implies that all but one model profiles of both lines qualify as a |Δ typ | 1 type with most cases having |Δ typ | 0.4, and thus with the model intensities I mod safely within the uncertainty intervals.
The histogram in Figure 12 demonstrates the accuracy of the model in reproducing the peak intensities I 2 . It shows the number of occurrences of reconstructed Mg II h and k profiles with the deviation of the model intensities Δ 2 given by the , 4 2 2,obs 2,mod 2,obs where 〈I 2,obs 〉 and á ñ I 2,mod are the average peak intensity of the observed and model profile, respectively. They are defined as 〈I 2 〉 = 0.5(I 2v + I 2r ), where I 2v and I 2r are the intensity of the violet and red peaks, respectively. The value of σ 2,obs is taken as the minimum of the uncertainties of I 2v,obs and I 2r,obs , i.e., 2,obs 2v,obs 2r,obs . The histogram implies that 95% of the Mg II h model profiles and 91% of the Mg II k model profiles are characterized by a deviation |Δ 2 | 1. This means that the model intensities I 2,mod of both lines are mostly within the interval of the observation uncertainties σ 2,obs .
The histogram in Figure 13 illustrates the accuracy of the model in reproducing the center intensities I 3 . It shows the number of occurrences of reconstructed Mg II h and k profiles with the deviation of the model intensities Δ 3 given by the formula where I 3,obs and I 3,mod are the center intensity in the reversal of the observed and model profiles, respectively, and σ 3,obs is the uncertainty. The histogram implies that 96% of the Mg II h model profiles and 93% of the Mg II k model profiles are characterized by a deviation |Δ 3 | 1. Thus the model intensities I 3,mod of both lines are mostly within the interval of the observation uncertainties σ 3,obs . Finally, we would like to remind the reader that the model and the presented analysis of its accuracy pertain to a range of Bremen Mg II index values of 0.150-0.165 while the up-to-date measured range is 0.149-0.180 (Section 2.3). Thus the model should be taken with caution for index values higher than 0.165.

Reconstruction of SSI
We demonstrated in Section 5 that the new model accomplishes a credible reconstruction of the spectral shapes of disk-averaged Mg II h and k profiles relevant for radiativetransfer modeling. In this section we aim to test the ability of the model to reconstruct also the SSI over longer time spans and to compare it with the benchmark values measured by the SORCE/SOLSTICE instrument over its mission lifetime from 2003 April 4 until 2020 February 26 available through the LISIRD database.
The top panels in Figure 14 show the IRIS spectral irradiances reconstructed by the model in Table 3 using daily values of the Bremen Mg II index. The relevant Mg II h and k profile intensities are converted into spectral irradiances by Equation (1) and integrated over intervals of 1 Å and 1.75 Å, both with midpoints at the line centers. The integration limits of the former coincide roughly with the local minima k 1 (Figures 6, 7, and 10). The integration limits of the seemingly ad hoc interval of 1.75 Å have no correspondence to the properties of the Mg II h and k profiles observed by IRIS but are dictated by the spectral resolution limitations of the SORCE/ SOLSTICE instrument. The middle panels of Figure 14 show the spectral irradiances computed from measurements by SORCE/SOLSTICE. The observed Mg II h and k profiles are integrated over the wavelength intervals of 1.75 Å indicated by the short vertical dashes at the bottom x-axes in the bottom panels of Figure 14. Also here the integration limits coincide with estimated positions of the local minima k 1 . The relatively low spectral resolution of SORCE/SOLSTICE causes an absence of central reversals in the Mg II h and k profiles. The absolute and relative differences of the wavelength-integrated spectral irradiances on the dates of their minima and maxima are summarized in Table 4. The listed values are inferred from boxcar-averaged irradiances smoothed over 399 days.
Comparison of the top and middle panels in Figure 14 shows (1) high correlations of data obtained by the instruments (both daily and smoothed) with the relevant correlation coefficients equal to one, (2) an ability of the model to fill the data gap in SORCE/SOLSTICE measurements from mid-2013 to early 2014, (3) that the reconstructed spectral irradiances seem to have larger daily variations than the SORCE/SOLSTICE measurements likely because they capture mainly chromospheric variations while SORCE/SOLSTICE with its wider integration interval may cover also the upper photosphere with smaller daily variability of spectral irradiance, (4) that the reconstructed spectral irradiances are smaller than the SORCE/ SOLSTICE measurements for both integration intervals likely due to the difference in calibration of instruments documented in Figure 1 in Paper I, and (5) a substantial reduction of differences between the model-reconstructed and observed irradiances to ∼0.8 mW m −2 when using the integration interval of 1.75 Å (middle panels). Of course, the ad hoc numerical identity of the integration intervals does not guarantee an equivalence of relevant irradiances.
An inspection of Table 4 shows that (1) the modelreconstructed irradiances feature greater absolute and relative Table 3 Coefficients α i and β i of the Function P i = α i + β i BI between the Parameter P i in Equation (2) and the Bremen Mg II Index  Figure 10. The same as Figure 7 but the observations (circles) are overplotted with the reconstructed profiles (red and blue lines) from the model parameters in Table 3. Figure 11. Histogram of typical deviations Δ typ (Equation (3)) of the model Mg II h and k profiles (red and blue, respectively), computed by the parameters in Table 3, and the observed disk-averaged profiles. The data correspond to IRIS mosaics taken with spatial and spectral binning 2. Figure 12. Histogram of deviations Δ 2 (Equation (4)) of the averaged peak intensities 〈I h2v,r 〉 and 〈I k2v,r 〉 of the model Mg II h and k profiles (red and blue, respectively), computed by the parameters in Table 3, and of the observations. The data correspond to IRIS mosaics taken with spatial and spectral binning 2.
differences between the minimum and maximum values than the observed irradiances and (2) the dates of the minima and maxima of the irradiances are offset by about several months for both instruments and also in comparison to the minimum and maximum of solar cycle 24 (Section 2.1).

Treatment of Spectral Smearing
An effect of spectral smearing is inherent also in all IRIS spectra. It needs to be taken into account particularly in comparing observations with results of radiative-transfer modeling via convolving the latter by an instrumental profile. Gaussian shapes of the instrumental profile of the IRIS NUV channel with slightly different FWHMs of 60, 52, 52, and 50.54 mÅ were assumed in spectral modeling by Pereira et al.  Table 1).
To assess the effect of spectral smearing on the diskaveraged Mg II h and k profiles treated throughout this paper (Figures 2, 6, 7, and 10; Table 1) and provided through the IDL procedure get_mgii_hk.pro (Section 4.4), the double-Gaussian model function (Equation (2)) is modified appropriately. It is assumed that both Gaussians result from a convolution with a Gaussian-shaped instrumental profile, having a width s = An effect of restoration by this formula is exemplified by the reconstructed Mg II h and k profiles in Figure 10 from 2019 October 20 and 2014 March 17, i.e., for days close to the end and the maximum of the solar cycle, respectively. The profiles, restored by Equation (6), are shown in Figure 15 by the black dotted lines together with the relative differences in the bottom panels. Here we assume the width of the IRIS instrumental profile σ IP = 22.5 mÅ corresponding to a FWHM = 53 mÅ. The differences of a few percent prove that the effect of spectral smearing can be safely neglected for the results presented here and also in Paper I. In this context we note that the adopted value of σ IP = 22.5 mÅ is much smaller than the widths σ 1,2 ∼ 100 mÅ of the Gaussian components in Figures 8 and 9. Another reason to neglect spectral smearing here is an uncertainty in the shape and width of the instrumental profile of the IRIS NUV channel. This is documented by the right panel in Figure 13 Table 2) measured in a quiet-Sun region. The histogram shows the occurrence of profiles with the widths down to 40 mÅ suggesting that the IRIS NUV instrumental profile may be narrower than the assumed value of 53 mÅ. We conclude this section by recalling that spectral smearing cannot be neglected in cases when the relevant widths of synthetic Mg II h and k profiles are comparable with the width of the instrumental profile as in Heinzel et al. (2015), Jejčič et al. (2018), and Tei et al. (2020).

Discussion
It has been already pointed out in Kowalska-Leszczynska et al. (2018) that employment of the composite Lyα index invokes an ambiguity issue common also for the Bremen Mg II index. Different disk-averaged profiles may correspond to the same value of the index, depending on the coverage of the solar disk with active regions and filaments. Similarly, because the definition of the Bremen Mg II index involves summing spectral irradiances over several wavelengths (see, e.g., Equation (1) in Snow et al. 2019), disk-averaged Mg II h and k profiles with different spectral shapes may result in the same value of the Bremen Mg II index. The testing of the model accuracy in Section 5 (Figures 12 and 13) suggests that the issue may become apparent in less than one profile reconstruction out of ten.
The possible heliolatitude variation of the disk-integrated Mg II h and k line profiles and the Bremen Mg II index is, to our knowledge, unexplored. Some form of variation should be expected because, as shown by Schmit et al. (2015), the Mg II h profile depends on features on the solar disk that are being observed and the latitude distribution of these features is inhomogeneous and varies during the solar cycle. Should the disk-integrated Mg II h and k profiles indeed vary with heliolatitude, this would potentially have consequences for the definition of incident radiation for radiative-transfer calculations. However, a recent investigation of the variation of the solar spectrum with heliolatitude by Kiselman et al. (2011) seems to have brought a negative result, i.e., no variation (Bzowski et al. 2013). A mild heliolatitude dependence of diskand wavelength-integrated Lyα irradiance is considered in Kowalska-Leszczynska et al. (2018, Equation (2)) with references on previous theoretical and observational studies. This might be relevant for Gunar et al. (2020).
Exact incident radiation, affecting the mean intensity J, is rarely available. The geometry and formalism of the problem are outlined in Heinzel (1983, Figure 1), Rompolt (1987), andSahal-Brechot et al. (1986, Figures 2 and 3). A target is illuminated from all directions and this illumination varies spatially. Ideally, one should take into account an actual Figure 13. Histogram of deviations Δ 3 (Equation (5)) of center intensities I k3, h3 of the model Mg II h and k profiles (red and blue, respectively), computed by the parameters in Table 3, and of the observations. The data correspond to IRIS mosaics taken with spatial and spectral binning 2. brightness topology of underlying solar features visible from an altitude of the target (e.g., prominences or flare loops) illuminating it at the time of observation (Vial et al. 2019, Section 2.2). For off-limb targets this is fully practicable only with the availability of simultaneous stereoscopic observations (Vial et al. 2016). Otherwise, one should use the incident radiation dated roughly one week prior to or subsequent to target observation at the west or east limb, respectively (Section 4.4).
The problem of incident radiation is consistently solved in Zhang et al. (2019, Section 4) in the case of the plasma diagnostics of an eruptive prominence observed on 2014 May 28. Incident radiation is represented by the actual brightness topology inferred from the IRIS full-disk mosaic taken from  Table 3 (gray dots in top panels) and computed by the SORCE/SOLSTICE observations (gray dots in middle panels) taking integration intervals Λ of 1 Å and 1.75 Å. The red and blue lines represent boxcar-averaged values smoothed over 399 days. The different line styles distinguish between the intervals of 1 Å (solid in top panels) and 1.75 Å (dotted in top and middle panels) for the IRIS model reconstructions and of 1.75 Å for the SORCE/SOLSTICE observations (solid in middle panels). The vertical dashes at the bottom x-axes mark the dates of minima and maxima of the smooth irradiances by IRIS (top panels) and SORCE/SOLSTICE (middle panels) given in Table 4. The relative variations with respect to the minima are shown at the right y-axes. Bottom panels: The Mg II h and k profiles averaged over the mission lifetime of SORCE/SOLSTICE. The vertical dashes at the bottom x-axes mark the wavelength intervals of 1.75 Å considered in computing the integrated spectral irradiances in the middle panels.
May 27 to May 28. Although at that time the solar disk featured several active regions ( Figure 16) the prominence-relevant incident radiation came solely from a quiet area , Figure 15). We conclude this section by noting that in the absence of an actual brightness topology the model presented in Table 3 yields the best approximation of the incident Mg II h and k radiation currently available for targets observed on an arbitrary day of the solar cycle and at an arbitrary heliolatitude when the Bremen Mg II index is lower than 0.165. For its higher values the accuracy of the reconstructed incident radiation is uncertain. An updated model, based on new data taken over a solar maximum stronger than that of solar cycle 24, would be needed.

Conclusions
Based on selected IRIS full-Sun mosaics in the NUV covering almost the full solar cycle 24, we find an analytic representation of the spectral shapes of Mg II h and k line cores parameterized by the Bremen Mg II index. The definition of the model is given by Equation (2) and the parameters are given in Table 3. For a given value of the Bremen Mg II index, the model provides the spectral shapes of Mg II h and k line cores. The uncertainties of the present model are difficult to assess. We estimate, however, that the model is accurate in more than 90% of profile reconstructions for a set of selected Bremen Mg II indices from the range 0.150-0.165. By model accuracy we mean that the entire reconstructed profile is within the observational uncertainties. A follow-up study in this series will address the issue of sensitivity of the radiative-transfer models to Mg II h and k cyclical variability. Another possible application of the series of calibrated IRIS mosaics is to readdress the question whether the quiet Sun changes over the solar cycle at the chromospheric layers (Solanki 2007). Measurements by White & Livingston (1981) showed no significant systematic variability in the intensity parameters of the Ca II K line core for quiet regions near the center of the solar disk over the years [1975][1976][1977][1978][1979][1980] in the rising phase of solar cycle 21. It bears on the stability of the basic supergranulation Table 4 Absolute ΔE and Relative ΔE r Differences of Wavelength-integrated Spectral Irradiances in Figure 14 on the Dates of Their Minima t min and Maxima t max for the Integration Intervals Λ  Figure 15. The reconstructed Mg II h and k profiles from Figure 10 with (red and blue lines) and without spectral smearing (black dotted lines) and their relative differences (bottom panels). flow process and the quiet network during a solar cycle. This conclusion can be reassessed by IRIS mosaics capturing quiet-Sun regions over longer time spans compared to previous measurements. Finally, we would like to warn the reader that our data can be used for specific problems, but other situations may require another approach. For example if the prominence is located just above a quiet region (no activity around) at rather low heights, it will be illuminated predominantly by the quiet-Sun radiation, which is closer to the solar cycle minimum data. This can be the case of, e.g., the polar crown filaments observed during times of enhanced solar activity elsewhere on the disk. The almost perfect anticorrelation between the ratio of the peak intensity to the center intensity and the Bremen Mg II index (Table A2) motivated us to look for a best-fit model of the data with binning 2 shown in Figures 5 and A1. Parameter inference of the linear model y = q + kx and the ad hoc noninteger power model y = r + a(x − 0.15) p was carried out with the help of the Markov Chain Monte Carlo (MCMC) sampling algorithm implemented in the IDL toolkit SoBAT by Anfinogentov et al. (2021). We ran the MCMC fitting of both models with 10 5 samples after the initial burn-in stage with 5 × 10 4 samples. The definitions of the initial guesses of model parameters and the priors, common for both the Mg II h and k data, are summarized in Table A1. Figure A2 shows histograms approximating the marginalized posterior distributions of the model parameters obtained by the MCMC sampling and estimates of the maximum a posteriori probability and the uncertainties by 95% credible intervals. The Bayesian parameter inferences and the Bayesian factors K pow/lin are summarized in Table A2. Note the relatively broad credible intervals of the parameter a. The corresponding fits by the linear model and the noninteger power model are displayed by the solid and dashed lines, respectively, in Figure A1, intentionally for the full range of measured values of the Bremen Mg II index 0.149-0.180 (Section 2.3).
We carried out several trial runs of the MCMC fitting with the same parameters in Table A1. They yielded the histograms in Figure A2 with slightly different shapes and Bayesian factors oscillating around 2. Thus Figure A2 and the factors in Table A2 are only illustrative examples. The factor K pow/lin quantifies the level of evidences of the two models. Its values are close to the limit between inconclusive and positive evidence to the noninteger power model in front of the linear model (Arregui 2018, Table 1). Therefore, the limited data currently available, covering only half of the full range of measured values of the Bremen Mg II index, does not allow us to prefer one model over the other. However, the models predict distinct trends of the ratio for index values larger than 0.165 ( Figure A1). While the linear model predicts a divergence of the ratios for Mg II h and k toward a value of Figure A1. Correlations between Bremen Mg II index and the ratio between averaged peak intensities and center intensities of the IRIS disk-averaged Mg II h (red) and Mg II k (blue) line profiles. The data correspond to the IRIS mosaics taken with spatial and spectral binnings 2 (empty circles) and 4 (filled circles). The solid and dashed lines represent data fits by the linear and the noninteger power function, respectively.   (Table A2). roughly 1.4, the noninteger power model implies a common trend toward ∼1.35 at a maximum index value of 0.180. This will hopefully enable us to test the models in the future when the observed Mg II h and k peak-to-center intensity ratios will be available for high solar activity characterized by a range of Bremen Mg II index values of 0.165-0.180.

Appendix B Restoration Formula
Assume that a Gaussian component G(x) in Equation (2) is a result of convolution given by the formula x is a spectrally unsmeared Gaussian and  ( ) x N is the unit-area instrumental profile sometimes referred to also as the apparatus function (e.g., Brault & White 1971). For simplicity, here we write x instead of Δλ and without loss of generality we also assume that the Gaussian peak is at Δλ = 0. The left side of Equation (B1) can be written as where A and σ are of the same meaning as in Equation (2)  Its inverse Fourier transform yields the sought formula for the unsmeared Gaussian used in Equation (6)

3.16
Note. Bayesian parameter inferences by the linear fit y = q + kx and the noninteger power fit y = r + a(x − 0.15) p , and the corresponding Bayesian factor K pow/lin . Posterior summaries are given by the maximum a posteriori probability and uncertainties by 95% credible intervals.