Spectral Characteristics and Formation Height of Off-Limb Flare Ribbons

Flare ribbons are bright manifestations of flare energy dissipation in the lower solar atmosphere. For the first time, we report on high-resolution imaging spectroscopy observations of flare ribbons situated off-limb in the H$\beta$ and Ca II 8542 {\AA} lines and make a detailed comparison with radiative hydrodynamic simulations. Observations of the X8.2-class solar flare SOL2017-09-10T16:06 UT obtained with the Swedish Solar Telescope reveal bright horizontal emission layers in H$\beta$ line wing images located near the footpoints of the flare loops. The apparent separation between the ribbon observed in the H$\beta$ wing and the nominal photospheric limb is about 300 - 500 km. The Ca II 8542 {\AA} line wing images show much fainter ribbon emissions located right on the edge of the limb, without clear separation from the limb. RADYN models are used to investigate synthetic spectral line profiles for the flaring atmosphere, and good agreement is found with the observations. The simulations show that, towards the limb, where the line of sight is substantially oblique with respect to the vertical direction, the flaring atmosphere model reproduces the high contrast of the off-limb H$\beta$ ribbons and their significant elevation above the photosphere. The ribbons in the Ca II 8542 {\AA} line wing images are located deeper in the lower solar atmosphere with a lower contrast. A comparison of the height deposition of electron beam energy and the intensity contribution function shows that the H$\beta$ line wing intensities can be an useful tracer of flare energy deposition in the lower solar atmosphere


INTRODUCTION
Solar flares are phenomena associated with sudden energy releases caused by the rapid reconfiguration of coronal magnetic fields. A significant amount of the released energy is transported along magnetic loops via precipitation of accelerated particles and thermal conduction to the lower layers of the solar atmosphere (Hirayama 1974). Most of this energy is dissipated on reaching the dense footpoints of the magnetic loops, giving rise to flare ribbonsstriking intensity enhancements marking the footpoints of flare loop arcades (Fletcher et al. 2011). Flare ribbons are observed mainly through the optical, near-infrared, UV, EUV and XEUV spectral domains. They provide clues to our understanding of the physics of solar flares and vital diagnostics for the processes of energy dissipation (Druett et al. 2017). Despite tremendous observational and numerical modeling efforts over the past few decades, many aspects of flare ribbon physics, such as their formation height, spectral characteristics, and radiation mechanisms at different spectral domains, remain the subject of ongoing debate. One of the main spectral characteristics of chromospheric ribbons is the reversed Hα line profile with broad, enhanced, and asymmetric wing emission (Ichimoto & Kurokawa 1984;Berlicki 2007;Kuridze et al. 2015). Other chromospheric spectral lines, such as Mg II, and Na I D1 and D2, reveal similar flare ribbon characteristics (Kerr et al. 2016;Kuridze et al. 2016). The Ca II H & K and Ca II 8542Å line profiles turn into emission in the flaring chromosphere, with or without a central reversal (Abbett & Hawley 1999;Allred et al. 2015;Kuridze et al. 2015Kuridze et al. , 2017Kuridze et al. , 2018. Machado et al. (1980) developed semi-empirical models of bright and faint flares that reproduce lines and continua of the neutral H I, Si I, C I, and singly-ionised Ca II and Mg II. The models show a substantial temperature enhancement from the photosphere up to the transition region. Various static and dynamic models of the flaring chromosphere can reproduce the basic spectral characteristics of the observed line profiles (Canfield et al. 1984;Fang et al. 1993). In the majority of flare simulations the flare energy is transported from reconnection sites toward the lower atmosphere via electron beams, which are considered as the most effective energy-transport and heating mechanism (Brown 1971;Hudson 1972;Druett et al. 2017). Beam heating can exist for extended periods of time in a flare atmosphere, including the gradual flare phase (Tandberg-Hanssen & Emslie 1988). Zharkova & Kobylinskii (1993) analytically calculated non-thermal ionisation and excitation rates of hydrogen in a hydrodynamic atmosphere heated by electron beams, demonstrating that the beam heating significantly increased the ionisation degree of hydrogen in the lower atmosphere. Kašparová & Heinzel (2002) also investigated the influence of non-thermal collisional rates, related to an electron beam, on hydrogen Balmer line profiles. They show that the intensity of line wings are significantly enhanced for typical values of the beam energy flux. The Ca II H & K and Ca II 8542Å line emissions are also enhanced, however the line wings are less sensitive to the beam heating (Fang et al. 1993).
Dynamic flare models obtained by radiation-hydrodynamic (RHD) simulations such as RADYN (Carlsson & Stein 1997;Abbett & Hawley 1999;Allred et al. 2015  Colored dashes correspond to the intensity cuts shown in the bottom left and middle panels. Bottom left and middle: Intensity cuts along the colored dashes in the top panels. The nominal limb (h ∼ 0 Mm) is defined as an average of all middle points of intensity cuts at ∆λ = −1.75Å (top right panel). Bottom right: Ca II 8542Å line profiles representing the ribbon emission (red line, red asterisks in the top panels) and the near-ribbon on-disk emission (magenta line, magenta asterisk in the top panels). a response to electron beam heating (Rubio da Costa et al. 2015;Kuridze et al. 2015). These results suggest that Balmer line wing emission can be a very effective tracer of flare energy deposition in the lower atmosphere (Canfield & Gayley 1987). Observations and modeling of flares on dMe stars by Hawley & Pettersen (1991) and Kowalski et al. (2010Kowalski et al. ( , 2013Kowalski et al. ( , 2017 reveal that the hydrogen Balmer lines can be extremely broad. More recently, Druett & Zharkova (2018) found that beam heating leads to an increase of Lyman, Balmer, and Paschen continua as well as wing emission in the Balmer and Paschen lines. Druett & Zharkova (2018) also explained the formation of large redshifts observed in Balmer lines (see e. g., Ichimoto & Kurokawa 1984), as well as white-light Paschen emission generated in solar flares heated by non-thermal electrons. Druett & Zharkova (2019) investigated the role of radiative transfer in Lyman lines and continuum in maintaining ionisation and white-light emission. They found that the plasma heating caused by beam electrons led to an increase in Lyman line and continuum radiation.  Numerical and semi-empirical models of flares by Mauas (1990Mauas ( , 2007 show that flare-related perturbations can affect the formation heights of line cores and wings as well as the continuum emission originating in the photosphere. Observations of flare footpoints and ribbons at the solar limb can provide direct information on the formation height of emission sources in different spectral lines, which in turn can be crucial to determine the stopping depth of energetic electrons, where they lose their energy completely. In contrast to disk flares and their associated ribbons, there is a lack of high-resolution observations of off-limb flare ribbons. Krucker et al. (2015) investigated the formation heights of off-limb flare footpoints observed at 6173Å in continuum images of the Solar Dynamics Observatory's (SDO; Pesnell et al. 2012) Helioseismic and Magnetic Imager (HMI; Schou et al. 2012;Scherrer et al. 2012) and hard X-ray observations from the Reuven Ramaty High-Energy Solar Spectroscopic Imager (RHESSI; Lin et al. 2002a). They show that the 6173Å continuum and hard X-ray emissions are closely correlated in space, time, and intensity, and are formed at heights of 300 − 450 km above the visible solar limb. Heinzel et al. (2017) investigated radiation mechanisms responsible for enhanced continuum emission at 6173Å using HMI observations of off-limb flares and RHD simulations Flarix (Heinzel et al. 2016) of flare heating by electron beams. They show that Paschen recombination continuum dominates in the continuum emission. Druett & Zharkova (2018) also modelled the Paschen continuum emission and investigated its formation depth as a function of HXR emission. They found that the height distribution of contribution functions for the Paschen continuum correlates closely with observations of WL and HXR emission reported for limb flares (Martínez Oliveros et al. 2012).
On 2017 September 10, the Active Region (AR) NOAA 12673 at the western limb of the Sun produced the SOL2017-09-10T16:06 X8.2-class flare (Figure 1), ranked as the second-largest flare of solar cycle 24, causing significant space weather and heliospheric effects. The event was observed with the Swedish Solar Telescope (SST; Scharmer et al. 2003a,b) using high-resolution imaging spectroscopy in the hydrogen Hβ 4861Å Balmer line and in the Ca II 8542Å line. The SST data yielded some unique spectropolarimetry which allowed the construction of a map of the magnetic field of the off-limb flare loops . Density diagnostics of the bright apex of the flare loop arcade are given by Koza et al. (2019). This paper presents an analysis of high-resolution imaging spectroscopy data of off-limb ribbons of the X8.2-class flare acquired by SST. To our knowledge, high-resolution observations of off-limb flare ribbons in the hydrogen Balmer lines have not been previously reported. The RHD code RADYN is used to investigate the formation of the Hβ and Ca II 8542Å line profiles and their intensity contribution functions in the flaring atmosphere involving ribbons at the limb.  Scharmer et al. 2008) and the CHROMospheric Imaging Spectrometer (CHROMIS) instruments, both based on dual Fabry-Pérot interferometers (FPI) mounted on SST. The imaging setup includes a dichroic beamsplitter with the transmission/reflection edge at 5000Å. CRISP is mounted in the reflected red beam and CHROMIS in the transmitted blue beam (Löfdahl et al. 2018, Figure 2).
CRISP data is comprised of narrow-band imaging spectropolarimetry in the Ca II 8542Å line profile sampled from −1.75Å to +1.75Å in 21 line positions ±1.75, ±0.945, ±0.735, ±0.595, ±0.455, ±0.35, ±0.28, ±0.21, ±0.14, ±0.07, 0.0Å from line center (hereafter, unless specified otherwise, when referring to the Ca II line we mean the Ca II 8542Å line). The Ca II Stokes I profiles taken at 16:32 UT are used for the analysis; a detailed analysis of the Stokes Q, U, V profiles is presented in Kuridze et al. (2019). The CRISP data is processed by the CRISPRED reduction pipeline (de la Cruz Rodríguez et al. 2015) and reconstructed with Multi-Object Multi-Frame Blind Deconvolution (MOMFBD; Löfdahl 2002;van Noort et al. 2005).
The spatial sampling was 0.057 pixel −1 and 0.0375 pixel −1 for the Ca II and Hβ lines, respectively. The spatial resolutions were close to the diffraction limit of the telescope at this wavelengths, i.e., ∼0.215 (155 km) and ∼0.122 (88 km) for the selected Ca II and Hβ images in the time series. More details on the observations, data, and radiometric calibration can be found in Kuridze et al. (2019) and Koza et al. (2019). Due to the highly variable and less-than-optimum seeing, only one CRISP and CHROMIS scan taken at the moment of the best viewing conditions at ∼ 16:32 UT, i.e. ∼ 25 min after the flare peak at ∼ 16:06 UT is used in our analysis.
The flare was also observed with the Fermi Gamma-ray Burst Monitor (GBM; Meegan et al. 2009). The flare was observed only partially with RHESSI (Lin et al. 2002b) as observations were suspended between ∼16:17 and 16:40 UT during the satellite's passage through the South Atlantic Anomaly. In Section 3.2 we describe the analysis of the Fermi GBM and RHESSI datasets. The hard X-ray spectral analysis was performed using the Object Spectral Analysis Executive (OSPEX; Schwartz et al. 2002) to estimate the power P nth deposited in the chromosphere by the non-thermal electrons, assuming a thick-target model.
The event was also observed with NASA's Solar Dynamics Observatory (SDO) Atmospheric Imaging Assembly (AIA; Lemen et al. 2012) 1600/1700Å and several Extreme-UV channels as well as the HMI Scherrer et al. 2012) instrument in white-light continuum.  . The morphology of the flare event suggests that the electron beam propagates down along the flare loops from the apex, heating the chromosphere near the loop footpoints, manifested as the off limb brigtenings seen in Hβ and Ca II images (white boxes in Figure 1). Therefore, we interpreted them as the off-limb flare ribbons projected on the limb and seen from the side. SDO/HMI continuum data at 6173Å also show the off-limb enhanced emission as a slipping ribbon feature (Jejčič et al. 2018). The off-limb brightening located in the ranges x = 10 − 22 Mm and y = 0 − 7 Mm in Figure 2 can not be confidently identified as the footpoints of a flare loop arcade. Therefore, our focus is on the flare ribbon near the right footpoint of the arcade marked with the white box in Figure 1 and covering the brightest flare kernel. The ribbons are absent in both Hβ and Ca II core images ( Figure 1: left panels). Figure 2 shows that the ribbons are located above the edge of the disk, which is separated from the ribbons at some sections by a dark gap. To investigate the separation between the off-limb ribbons and the limb, intensities are extracted along short dashes of length 1.8 Mm which cross the limb, shown as coloured lines in the top panel of Figure 2. The position of these dashes are chosen to cross the limb, the dark gap, and the off-limb ribbons. The intensity profiles are shown in the bottom left panel of Figure 2. The position of the nominal Hβ limb, or the nominal h ∼ 0 Mm level, is defined as the middle point of the steep intensity gradient at ∆λ = −1.2Å along the orange dash. This level varies at different positions along the limb indicating the presence of inhomogeneous footpoint heating and also a possible Wilson depression. It is known that the limb is uplifted by about ∼350 km above the base of the photosphere at τ 5000 = 1 (measured at µ = 1) (Lites 1983, Table 1). We note that µ is the cosine of the angle θ between the LoS and the surface normal (heliocentric angle) so that θ=0 • at disk center and 90 • at the limb. This off-set is due to an increase of optical depth at 5000Å when looking from disk center (µ = 1) to limb (µ = 0). The nominal limb defined above is also expected to be formed at ∼350 km above the τ 5000 = 1 at µ = 1. The apparent separation projected on the plane of sky, defined as the distance between maximum intensity of the ribbon emission and the nominal limb, varies between 300 − 500 km (Figure 2: bottom left panel). The estimated vertical extension of the ribbon at Hβ ±1.2Å, defined as the average of the full width at half maxima at several intensity cuts across the ribbon, is around 300 km.

Off-Limb Ribbon Appearance
The bottom right panel of Figure 2 shows the ribbon and gap Hβ line profiles from the pixel positions at (x, y) ∼ (28.5, 13) Mm identified in the top panel by the asterisks. We assume that these line profiles are observed perpendicular (µ ≈ 0) to the propagation of the electron beam along the loops anchored at the footpoints. Both the ribbon and the dark gap Hβ profiles are reversed. The wing intensities of the ribbon at |∆λ| > 0.4Å are strongly enhanced, whereas intensities around line core at |∆λ| < 0.4Å coincide with the line core intensities of the dark gap.
The top panel of Figure 3 shows the Ca II wing images at wavelength positions ∆λ = −0.735Å and −1.75Å from the line center. The intensities along the colored dashes crossing the limb are shown in the bottom left and middle panels. The far wing image and corresponding intensity cuts at ∆λ = −1.75Å (Figure 3: top right and bottom middle panels) do not show any obvious trace of the ribbon. Therefore these images are used to define the nominal Ca II limb setting nominal h ∼ 0 Mm, as the average of the middle points of the intensity cuts along the colored dashes crossing the limb. However, the ribbon is present as a small intensity enhancement at h ∼ 0.1 − 0.25 Mm in the ∆λ = −0.735Å wing image and the corresponding intensity cuts (Figure 3: top left and bottom left panels). This suggests that the Ca II ribbon emission is formed right at the edge of the disk without any clear separation between the ribbon and the nominal Ca II limb. The bottom right panel of Figure 3 shows the ribbon and near-limb Ca II line profiles from the pixel positions at (x, y) ∼ (24, 17) Mm identified in the top panels by the asterisks. The ribbon Ca II line profile is very broad, with core intensities coinciding with the line core intensities of the near-limb profile. The enhanced wing intensities within the wavelength ranges (−1.0, −0.5)Å and (0.5, 1.0)Å with respect to the corresponding wing intensities of the near-limb profile give rise to a brighter limb rim which is interpreted as the Ca II ribbon (Figure 3: bottom left panel).

AIA 1600Å, RHESSI and Fermi GBM hard X-ray spectra
The imaging spectroscopy observations in the Hβ and Ca II lines were recorded at ∼ 16:32 UT, ∼ 25 min after the main flare peak. To investigate the strength of non-thermal heating at this time we study the morphological evolution of the flare arcade and analyse the available Hard X-ray (HXR) data. Figure 4 shows the temporal evolution of the flare loop arcade until approximately 1 hour after the flare onset in a cool AIA 1600Å channel. This is the same flare loop arcade covered by the SST FoV, however SST and AIA images presented in Figure 1, 2, 3 and Figure 4, respectively, do not have the same orientation. The morphology and the evolution of the flare system indicates that the flare energy propagates along the legs of the flare arcade, from the top towards the footpoints. As a result the new flare loops are formed intensively during the first ∼50−60 minutes after the main peak. This is manifested as an apparent expansion of the flare loop arcade (Figure 4). This apparent expansion is a well-known phenomenon related to continuous/progressive reconnection, where the reconnection X-point re-forms at increasing height. As a result, the height of newly reconnected closed loops increases in time (Hori et al. 1997). An associated effect is the apparent increasing separation of flare ribbons at the loop footpoints. Two-dimensional models of solar flare loops from one-dimensional hydrodynamic calculations by Hori et al. (1997) demonstrate that the total energy released, and the energy release rate, are determined by the reconnection rate and hence an apparent expansion of flare loops. Images of the flare arcade and time-distance diagram in Figure 4 clearly show this apparent expansion during about an hour after flare onset, suggesting that the non-thermal electron beam heating is still present at 16:32 UT, 25 minutes after the main peak.
HXR emission is a typical signature for the presence of accelerated electrons in flares. The Fermi GBM sunwardfacing NaI 4 detector measured 4.3 − 98.8 keV X-ray and HXR flux curves are shown in the left panel of Figure 5. The emissions between ∼ 4 − 50 keV are significantly increased at ∼ 16:32 UT. The HXR spectrum is fitted with a thermal plus thick-target power law model using the OSPEX function thick2_vnorm yielding electron beam parameters such as total power contained in the electron distribution P nth , spectral index δ, and the low-energy cutoff E c of the flare. The right panel of Figure 5 shows an example of the NaI 4 detector spectrum taken at 16:32 UT. The fitted thermal and non-thermal components are overplotted as the blue and red lines respectively. The fitting to NaI 1, 2, and 3 detector data yield parameters which are consistent with those from NaI 4. The ∼ 20 − 40 keV energy range is excluded from the fit due to known calibration issues (Kowalski et al. 2019). The spectral results give estimates of δ ∼ 5.2, E c ∼26.5 keV, and P nth ∼ 7.8 × 10 28 erg s −1 at ∼ 16:32 UT ( Figure 5: right panel).
Unfortunately, there are no RHESSI imaging spectroscopy data for this event between 16:16 -16:41 UT. Therefore, we can not identify the HXR sources at the time of the analysed SST observations and make an accurate estimate of the size of the footpoints and the energy flux deposited into the chromosphere. Neither can the area of the ribbon be estimated by the far wing Hβ data as the full 2D extension of the ribbons is not seen, and they are partially covered by the limb. The reconstructed images for the HXR emission (using CLEAN; Hurford et al. 2002, detectors 3-8, beam width factor of 1), at the closest time to the analysed SST observations, are shown as black and blue contours in   (Figure 4b and 4d).

RADYN Code and RHD Model
To interpret the observational characteristics of the flare ribbon emissions in the Hβ and Ca II lines we use a model of a flaring atmosphere and synthetic line profiles computed with the RHD code RADYN (Carlsson & Stein 1997;Abbett & Hawley 1999;Allred et al. 2015). For a given model of a flare atmosphere, RADYN solves simultaneously the equations of hydrodynamics, statistical equilibrium, and radiative transfer under the non-local thermodynamic equilibrium (non-LTE) conditions (i.e. departures from LTE) on a 1D adaptive grid to synthesize spectral line profiles. The flare-related heating is included via a non-thermal electron beam. RADYN uses five bound levels plus continuum for hydrogen, eight levels plus continuum for neutral helium, five bound levels plus continuum for singly-ionized calcium, and three bound levels plus continuum for singly-ionized magnesium with complete frequency redistribution (CRD). RADYN uses beam excitation and ionization rates from Fang et al. (1993). Details on RADYN calculations of non-thermal collisional rates for different atomic species are provided in section 4 of Allred et al. (2015).
Several improvements have been made to the RADYN flare code since Allred et al. (2015), which are worth noting (they will be described further in Allred et al. 2020, in preparation). The hydrogen line broadening from Kowalski et al. (2017) and Tremblay & Bergeron (2009) has been included in the dynamic simulations. The relevant line broadening work has been largely completed by Kowalski et al. (2017), where the absorption coefficients in the framework of the linear Stark broadening theory of Vidal et al. (1971) are used, as employed and modified in Tremblay & Bergeron (2009) (profiles in Kowalski et al. (2017) were taken directly from Tremblay & Bergeron (2009)). In Kowalski et al. (2017), the line broadening was incorporated into the radiative transfer code RH (Uitenbroek 2001) and in the present model the Doppler-convolved profiles from Tremblay & Bergeron (2009) have been interpolated at each temperature and electron density and substituted directly into RADYN (except using a 6-level hydrogen atom in RADYN vs. a 20 level hydrogen atom in RH). The motivation to replace the Sutton (1978) plus Voigt profile method (previously used in RADYN and RH) was discussed in Allred et al. (2015) and Kowalski et al. (2015). Further details on Stark theory and absorption coefficients are given by Vidal et al. (1971), Vidal et al. (1973), Tremblay & Bergeron (2009), and Kowalski et al. (2017). The inclusion of hydrogen line Stark profiles in RADYN, including results and comparisons for different electron density regimes, will be presented in an upcoming work (Kowalski et al. 2020 in prep).
The QS.SL.HT model is relaxed with the new hydrogen broadening, and we choose to use the X-ray backheating formulation from Allred et al. (2005), described further in Kowalski et al. 2020 (in preparation). The resulting preflare apex temperature is 1.8 MK, with electron density 5 × 10 9 cm −3 . Finally, a new version of the F-P solver is used (Allred et al. 2020, in preparation), which gives a moderately smoother electron beam energy deposition profile over height in the upper chromosphere. These changes have been implemented for the models presented in Graham et al. (2020, under revision). The differences in the broadening of the Hβ line profiles at µ=0.047 between the new and old RADYN models are significant. The new model is adopted in this work.
The simulations were performed for a strong electron beam flux with F = 10 11 erg cm −2 s −1 (an F11 flare), an isotropic pitch angle distribution in the forward hemisphere (Allred et al. 2015). A constant heating flux was applied for 20 s into a plage-like initial model, closest to QS.SL.HT atmosphere described in Allred et al. (2015). A power-law index and a low energy cut-off of δ = 4 and E c = 25 keV, respectively, were adopted in the simulation. As mentioned in section 3.2, the morphology of the analysed flare event cannot be used to constrain the electron beam energy flux. Apart from F11, we also investigated the F9 and F10 RADYN models (with 100 and 10 times weaker beam energy flux). However, these weaker models cannot reproduce the observed enhancement of the Ca II line wing emission. This motivated our choice for the F11 beam heating model. Other beam parameters are very close to those estimated from the HXR data (section 3.2).
The standard continuous reconnection scenario observed during the SOL2017-09-10T16:06 flare event suggests that beam heating is continuous for at least an hour after the flare onset. This produces a sequential heating of the flare loop assembly, observed as an apparent expansion of the loop arcade. RADYN cannot provide such a multithread approach as it simulates the flare as a single loop event. Therefore, we simulate the flare profiles observed at a footpoint of a specific loop at a specific time, with the RADYN model incorporating an instant electron beam injection lasting for 20 sec along the single loop.

Synthetic Hβ and Ca II 8542Å Line Profiles
RADYN simulations yield synthetic Hβ and Ca II line profiles for the flare model F11 at five different directions from disk center at µ = 0.95 to the extreme limb at µ = 0.047 shown in Figure 6. This particular set of µ is used in RADYN for the angular integration of the radiation field, which is anisotropic due to velocities. Due to the large optical path length, the optical depth is much larger towards the limb than for the vertical direction. As a result Hβ develops a strong central reversal encompassed by two emission peaks, whose intensity decreases toward the limb (Figure 6: left panel). Conversely, the Ca II line core intensity increases toward the limb, however, at µ = 0.047 it decreases and develops a weak central dip ( Figure 6: right panel) indicating that the optical depth is not changing significantly with respect to µ for the emission near the line core, whereas the source function is increasing dramatically (see a detailed explanation in section 3.6). The simulations show that the line wings have lower opacity and higher emissivity towards the limb for both lines ( Figure 6).

Contribution Function and Formation Heights
To determine the formation heights of the Hβ and Ca II lines in the flaring atmosphere, we examine their intensity contribution functions C I , which show the intensity as a function of wavelength and as a function of distance along the LoS. Carlsson & Stein (1997) introduced a formal solution of the radiative transfer equation for the emergent intensity expressed in terms of component factors of C I in the form: where z is the atmospheric height normal to the photosphere (z=0 is at τ 5000 =1), and S ν , τ ν , and χ ν are the source function, optical depth, and opacity (linear extinction coefficient) along the vertical direction, respectively. In Figures 7 and 8 we present C I and S diagrams for the Hβ and Ca II lines. The depicted quantities are plotted in inverse grayscale with darker areas showing higher values. Figure 7 shows the C I of the pre-flare Hβ line profile at t = 0 s (top panels) and 8 s (bottom panels) after the onset of beam heating by the F11 flare model near the limb and near the disk center at the direction µ = 0.047, 0.953, respectively. The vertical axes in Figures 7 and 8 show z, the height normal to the photosphere (µ = 1). Therefore, the contribution function computed along the LoS is given as a function of the projected LoS distance with respect to the vertical height in Figures 7 and 8  show that during the beam heating the τ = 1 layer at Hβ line wings is formed much higher than in the pre-flare atmosphere (the top middle and right panels of Figure 7). Consequently, the near-limb Hβ line wing intensities are formed much higher in the chromosphere at the heights of ∼ 0.9 − 0.95 Mm compared to the pre-flare intensity, which is formed at ∼ 0.1 − 0.35 Mm. The maximum of C I of the Hβ wing intensities occurs above the τ = 1 layer during the beam heating (Figure 7: bottom right C I panel). Furthermore, due to the large optical path length, the optical depth is much larger along the direction of lower µ. Therefore, the τ = 1 layer is formed much higher for the near-limb flare emission than near the disk center (Figure 7). This suggests that, at µ=0.047, the emergent intensities reflect conditions in a higher layer above ∼ 800 km, contrary to the case of µ=0.95 where the line profile spans a wide range of the lower flare atmosphere. The difference between the τ = 1 layers in the pre-flare and flare atmosphere for the different viewing geometries also changes the formation heights for the Ca II emissions (Figure 8). The C I diagrams at t = 0 and 8 s show that the τ = 1 layer for Ca II line wings are formed at similar heights for the same µ in the pre-flare and flare atmosphere ( Figure 8). However, similar to Hβ line, the τ = 1 layer for the Ca II line wings is formed higher for near limb emission (µ = 0.047) compared to the τ = 1 at the near disk emissions (µ = 0.953) (Figure 8).
The left panels in Figures 7 and 8 show that the line source functions of Hβ and Ca II are affected by the electron beam heating. For Ca II, the beam heating moves the point where the source functions decouple from the Planck function from heights of 0.6 Mm to 0.95 Mm. However, because the decoupling occurs above the formation heights of the Ca II line wings these are still formed under LTE conditions.  Figure 9 shows the temporal evolution and height distribution of the atmospheric parameters and line formation characteristics of the Hβ and Ca II lines covering the pre-flare stage at t = 0 s and at two heating stages of t = 8 s and 20 s after the onset of the electron beam heating. During the beam heating the temperature increases to ∼ 5000 − 30000 K over heights of ∼ 300 − 1100 km (Figure 9: top left panel), accompanied with an increase in collisional rates and electron density n e , from about 5 × 10 10 cm −3 up to ∼ 4 × 10 13 cm −3 .
The electron beam and increased temperature leads to a rapid change in the populations of atomic levels. The Hβ line arises from transitions between the n = 2 and n = 4 levels of neutral hydrogen. The beam heating excites electrons from the ground state and the first excited states to the upper levels: the collisional excitation (ionization) is due to thermal collisions (enhanced T and n e due to heating) and direct non-thermal excitation (ionization) by the beam electrons. The top right panel of Figure 9 shows that the ratio of the n = 2 level population over the total number of hydrogen atoms increases significantly during the beam heating over the height range 300 − 1100 km, invoking an increase of opacity in the Hβ line wing (Figure 9: bottom right panel). Consequently, the probability that the Hβ wing photons from deep layers at ∼ 100 − 400 km will be absorbed by the overlying atmosphere is increased. Therefore the Hβ wing intensity is formed in the higher layers of the flaring atmosphere compared to the pre-flare stage (Figure 7). The population of the n = 4 hydrogen level is also enhanced due to the beam heating (Figure 9: top right panel) invoking an increase of the source function and line intensities. We note that the line source function is frequency independent due to the assumption of CRD.
The ratio of the total population densities Ca II/Ca III (not shown) of two successive ionization stages of calcium decreases significantly at heights below ∼ 1250 km after the onset of the electron beam heating, suggesting an increased density of calcium ions in the second ionization stage. The Ca II line arises due to transitions between the 3 2 D 5/2 and 4 2 P 3/2 energy states. The bottom left panel of Figure 9 shows that despite the dramatic decrease of population density of the Ca II ions, the population density of the 3 2 D 5/2 state does not change much over the height range ∼ 200 − 900 km, which corresponds to the formation heights of the Ca II line wings (Figure 8: bottom right C I panels). Therefore the Ca II line wing opacity changes only slightly over these heights (Figure 9: bottom right panel). On The relative population densities of the n = 2 (left y axis) and n = 4 (right y axis) levels of hydrogen with respect to the total number density of hydrogen (neutrals). Bottom left: The relative population densities of the 3 2 D 5/2 (left y axis) and 4 2 P 3/2 (right y axis) energy states with respect to the density of the Ca II ions (right y axis). Bottom right: Line wing opacities χ of Hβ at ∆λ = −1Å (left y axis) and Ca II 8542Å at ∆λ = −0.6Å (right y axis) from the line center.
the contrary, the heating invokes an increase of two orders of magnitude in the Hβ line wing opacity over the heights ∼ 500 − 1000 km (Figure 9: bottom right panel). However, the population density of the Ca II 4 2 P 3/2 state increases by a factor of 10 over the height range ∼ 200 − 900 km, invoking an increase of the source function and line intensities at the beam heating phase (Figures 8: bottom right C I panel). Figure 10 shows the beam energy deposition together with C I (along the LoS) of the Hβ and Ca II line wing intensities at ∆λ = 1.0Å and 0.72Å, respectively as a function of height for the pre-flare atmosphere at t = 0 s and during the heating at t = 8 s (left panel) and t = 16 s (right panel). The panels show that the Hβ C I at ∆λ = 1.0Å has a pre-flare maximum at ∼ 150 km. However, during the beam heating the maximum raises to ∼ 900 km and the Hβ C I curve declines exponentially towards the lower layers. The contribution functions, computed from Equation 1, are defined by the opacity and emissivity, and hence the population densities of the atmosphere along the LoS. As shown in Figure 9, the population densities of the hydrogen n = 2 and n = 4 levels and line wing opacities decrease exponentially t=8 s during the beam heating over the height range 900 − 200 km (Figure 9: right panels). The beam heating function also decreases exponentially along the lower solar atmosphere (Figure 9). As a result, the decline in contribution function follows closely the declining energy deposition function over heights ∼ 900 − 500 km, suggesting that the Hβ line wing intensities might be a proxy for beam energy deposition in the flaring atmosphere ( Figure 9). Along ∼ 900 − 500 km the Planck function and source function are still not decoupled, indicating that the Hβ wing is forming under LTE conditions (Figure 7). Similar to the contribution function, the population densities, opacities, beam heating function, and the temperature also decrease exponentially over this height range (Figure 9: top left panel). This suggests that the beam energy over these heights is consumed by the heating, and heating (temperature) is the main parameter that redistributes the population densities/opacities and defines the formation of the Hβ line (emergent intensities).

Beam Heating versus Contribution Functions
The C I of the Ca II wing intensity at ∆λ = 0.72Å shows that there is no obvious correlation with the beam energy deposition curve. This is because the electron beam heating ionizes Ca II to Ca III rather then populating excited energy states responsible for Ca II line emission (Section 3.6).

DISCUSSION AND CONCLUSIONS
Observations of an X8.2-class solar flare, acquired with high spatial resolution in the Hβ and Ca II lines, are compared with the results of RHD simulation with the model parameters based on an analysis of HXR data. The observations give a rare off-limb viewpoint of flare ribbons, which are the flare-associated emissions at the footpoints of flare loops in the line wing images of Hβ and Ca II lines (Figures 1-3). The line profiles of the flare ribbons are broad, with significantly increased emissions in the line wings (Figures 2-3: bottom panels). Far wing flare intensities of Hβ and Ca II lines can be considered as emission from an optically thin plasma, hence they are less attenuated by the overlying atmosphere along the LoS (Asai et al. 2012). On the other hand, we know that the horizontal dimension of the flare ribbons is extended across far larger distances than the vertical width. Therefore, at the limb, there is far more optically thin ribbon plasma emitting along the LoS compared to a disk center viewing geometry. This produces an observed enhancement of the line wing intensities for off-limb flare ribbons. The analysis of synthetic flare line profiles from the RADYN model at different heliocentric angles confirms the enhancement of the far wing emissions of Hβ and Ca II lines toward the limb (Figure 6). One of the main limitations of the RADYN model used in the present work is that it considers the flare as a single loop, short-duration event whereas the observed flare arcade consists of many independent loops heated sequentially with continuous reconnection processes. Multithread hydrodynamic flare simulations presented in Warren (2006) have shown that the multithread modelling approach is an important consideration that can resolve some basic inconsistencies reported between observations and models (e.g. slow decay of the observed flare emission). The results from Warren (2006) suggest that the heating timescale for individual loops could be on the order of 200 s, suggesting that in multithread flares, heating could last tens of minutes or even an hour. With RADYN we simulate the flare profiles observed at the footpoint of a specific loop at a specific time with the model which incorporates an electron beam injection pulse lasting for 20 sec along the loop. Alternatively, the observed flare ribbon and extended HXR emission can be investigated using the models representing the atmosphere at the cooling phase preceded by intense electron beam heating. It was shown by F-P simulations that the beam electrons can become trapped at the stopping depth of lower energy electrons for an extended period of time (Siversky & Zharkova 2009). The appearance of the observed off-limb flare ribbon can be associated to these depths.
The synthetic line profiles in Figure 6 reveal that the intensity near ∆λ = ±1.2Å at µ = 0.047 is about four times higher than the disk center continuum near Hβ, whereas the intensity in Ca II line wings is only about 1.5 times higher than the disk center continuum near Ca II. The Hβ and Ca II line wing ribbons have different contrast, and hence different visibility, near the limb. Indeed, our off-limb observations show that the ribbons are far brighter and more prominent in the Hβ wing images than in the Ca II wing images. Avrett et al. (1986) also showed similar differences between synthetic Hα and Ca II 8498Å line profiles at different µ (see pages 238 and 243 therein). The main reason for this difference is that due to the low ionization energy, the fraction Ca II to Ca III during the beam heating decreases by approximately 10 to 100 times in the lower solar atmosphere indicating that a significant number of Ca II ions are becoming ionized to Ca III. Therefore, in contrast to Balmer lines, the beam precipitation ionizes Ca II to Ca III rather than producing excited levels of Ca II.
Ribbons are absent in the Hβ and Ca II line core and near-core images (Figure 1: left panels). Their absence is due to the maximum opacity at the line cores: at µ ∼ 0, the line core radiation can not transmit along the LoS through the opaque chromosphere canopy. Unfortunately, this is not captured in the RADYN model used in this work. The synthetic line profiles show enhanced line core intensities with strong central reversal in Hβ and at most a very weak central reversal in Ca II. RADYN uses a 1D plane-parallel geometry and therefore, at small values of the direction cosine µ, the emergent intensity from the model is calculated by integration of the source function over large distances through the flare atmosphere, compared to the curved plane of the true chromosphere where the flare only exists in a localised area. In addition, the observed LoS is populated by optically thick chromospheric structures (e.g., spicules, prominences) which are, of course, absent from the model. Therefore, the model overestimates the ribbon emissions, and the line core in particular.
The absence of ribbons in the Ca II far-wing images at ∆λ = ±1.75Å (Figure 3: top right panel) can be explained by a simple geometrical effect. The photospheric footpoints of the observed flare loops are not detected in the SST dataset since they are behind the limb . Therefore, the ribbons are also located behind the limb. However, due to the elevation we can see them, at least partially, off-limb. In the Hβ line wing, the apparent separation, or the projected formation height of the ribbon in the plane of the sky with respect to the nominal limb, is about 300 − 500 km. The Ca II ribbon at ∆λ = ±0.8Å does not show any clear separation from the Ca II limb defined as the edge of the solar disk at ∆λ = ±1.75Å. The ribbons at the line wing positions outside ∆λ = ±0.8Å are located deeper in the atmosphere and are obscured by the limb.
To understand the formation of the flare ribbons, we analyze components of the intensity contribution functions for the synthetic Hβ and Ca II lines computed with the RADYN code. We find that the near-limb maximum Hβ line wing emissions, interpreted as flare ribbons, are formed in the atmosphere at around 950 km above the base of the photosphere at τ 5000 = 1 (Figure 7: bottom right C I panel). In the non-flaring atmosphere Hβ line wing emissions are formed much deeper, at a height of around 200 km (Figure 7: top right C I panel). The beam heating rapidly changes the balance between the hydrogen populations in the chromosphere, with increased collision rates (both thermal and non-thermal) exciting electrons from the lower to the upper levels ( Figure 9: top right panel). This leads to a significant increase in the Hβ line wing opacities between heights of ∼ 400−950 km above the photospheric limb (Figure 9: bottom right panel). As a result, Hβ line wing photons emitted at a height of around 200 km are no longer able to escape freely along the LoS, which results in a change of formation height.
Our analysis indicates that the balance between the population densities of the energy states responsible for the Ca II emission is also affected by the rapid flare heating (Figure 9: bottom left panel). Opacities of the Ca II line wings change only slightly by the beam heating (Figure 9: bottom right panel). However, due to the significant increase in the upper-level population density of the Ca II line, the emissivity and the source function are increased in the upper layers. As a result the formation heights of the Ca II line wings are extended up to ∼ 900 km during the beam heating phase (Figure 8: lower right C I panel).
The observed separation between the off-limb ribbons and the limb photosphere is well reproduced by the simulations. The observed apparent separation (i.e., projection of the formation heights in the plane of sky) between the ribbon and the nominal limb is ∼ 300 − 500 km for Hβ and ∼ 0 km for Ca II. They are smaller than the C I -based formation heights in the model (∼ 900 km for Hβ and ∼ 400 km for Ca II) measured with respect to the base of the photosphere at τ 5000 = 1. The difference is likely due to uplift of the nominal limb above the base of the photosphere by about 350 km (Lites 1983, Table 1). Subtracting this offset from the C I -based heights brings them to a good agreement with the observed ribbon-limb separations. The comparison of the beam energy deposition and the Hβ intensity contribution function at ±1.0Å shows that in the current model the Hβ line wing intensities are a good proxy for the beam penetration and flare energy deposition over heights in the lower solar atmosphere (Figure 10).
To our knowledge, this is the first imaging spectroscopy at high spatial resolution of off-limb solar flare ribbons in the hydrogen Hβ 4861Å Balmer line and the near-infrared line of single ionized calcium Ca II 8542Å. Emission in the optically thin wings of the Hβ line show high-contrast off-limb flare ribbons which are elevated significantly above the photosphere. The results are very encouraging for future off-limb flare studies using chromospheric diagnostics, including the advanced modelling encompassing the opaque chromospheric canopy and spicules. The new-generation 4-m Daniel K. Inouye Solar Telescope (DKIST), with its advanced spectropolarimetric facilities, will offer excellent opportunities for off-limb flare measurements which, as demonstrated here, can provide powerful diagnostics of the flare atmosphere.