{'fraction_non_alphanumeric': 0.028888439104274386, 'fraction_numerical': 0.015713838850350527, 'mean_word_length': 4.588483290488432, 'pattern_counts': {'":': 1, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Envelope Convection, Surface Magnetism and Spots in A- and late B-type Stars

Weak magnetic fields have recently been detected in a number of A-type stars, including Vega and Sirius. At the same time, space photometry observations of A- and late B-type stars from Kepler and TESS have highlighted the existence of rotational modulation of surface features akin to stellar spots. Here we explore the possibility that surface magnetic spots might be caused by the presence of small envelope convective layers at or just below the stellar surface, caused by recombination of H and He. Using 1D stellar evolution calculations and assuming an equipartition dynamo, we make simple estimates of field strength at the photosphere. For most models the largest effects are caused by a convective layer driven by second helium ionization. While it is difficult to predict the geometry of the magnetic field, we conclude that the majority of intermediate-mass stars should have dynamo-generated magnetic fields of order a few gauss at the surface. These magnetic fields can appear at the surface as bright spots, and cause photometric variability via rotational modulation, which could also be wide-spread in A-stars. The amplitude of surface magnetic fields and their associated photometric variability is expected to decrease with increasing stellar mass and surface temperature, so that magnetic spots and their observational effects should be much harder to detect in late B-type stars.


INTRODUCTION
To a first approximation, main-sequence stars above around 1.5 M have a convective core and a radiative envelope. A more careful inspection reveals the presence of thin convective layers at or just below the photosphere, caused by opacity bumps and a decrease of the adiabatic gradient associated with the ionization of hydrogen, helium and iron-group elements. Cantiello et al. (2009) investigated the subsurface iron-ionization-driven convective layer (FeCZ), which in solar metallicity stars appear above about 7 M . Beside being important for driving surface turbulence, these convective layers could also host a dynamo, from where there is no difficulty for the resulting magnetic field to reach the surface via buoyancy (Cantiello & Braithwaite 2011). Surface field strengths of (very approximately) 5 to 300 G are predicted, depending on the mass and age of the star, with higher fields in more massive stars and towards the end of the main sequence. The FeCZ should play a role in various observational effects such as line profile variability, discrete absorption components and photometric variability, amongst others (Cantiello et al. 2009). In particular, the bright spots associated with emergent magnetic fields predicted by Cantiello & Braithwaite (2011) might have been recently observed by the MOST and BRITE missions (Ramiaramanantsoa et al. 2014(Ramiaramanantsoa et al. , 2018a). Short-lived, co-rotating bright spots can explain part of the photometric variability in a large fraction of the observed OB targets, and therefore could be an ubiquitous feature of these stars. The same subsurface convection that can produce these spots could also be responsible for the low-frequency power excess observed in a number of massive targets by both CoRoT and the BRITE constellation (See e.g. Blomme et al. 2011;Ramiaramanantsoa et al. 2018b;Bowman et al. 2018). The question then arises: Can the less vigorous surface and subsurface regions associated with hydrogen and helium ionization in stars between 1.5 and 7 M also produce observable effects? The possibility that these regions could lead to surface magnetism and spots is the subject of this paper.
Early-type stars display a bimodality in their magnetic properties (Aurière et al. 2007; see Spruit 2017 for reviews of magnetic fields in relevant kinds of stars). The chemically-peculiar Ap and Bp stars (accounting for a few percent of the population) have large-scale magnetic fields with strengths ranging from about 200 G to over 30 kG. These fields have not been seen to change with time, over decades of observations. Similar magnetic fields have been found in more massive OB stars. These magnetic fields are thought to be "fossils": a magnetic field in stable equilibrium, left over from some earlier epoch (Cowling 1945;Braithwaite & Spruit 2004). The Ap stars display unusually high abundances of rare earths and some lighter elements such as silicon, and inhomogeneities of these elements on the surface show correlation with the magnetic field structure. This is thought to be connected to a magnetic suppression of turbulence and convection, allowing the separation of different species via radiative levitation and gravitational settling near the stellar surface (Michaud 1970). Amongst the other A stars, various other chemical peculiarities are seen, for instance in the slowly-rotating Am stars -of which Sirius is the best-known specimen -and mercury-manganese stars. See Turcotte 2003 for a review of these 'skin diseases'.
Concerning the magnetic properties of the rest of the A-star population, one can generally only place upper limits of a few gauss on the large-scale magnetic fields , although it is possible in principle that a small-scale field somewhat stronger than that is present. In more massive stars the detection limit is rather higher than in A stars (e.g. Schnerr et al. 2008), but there is still a clear bimodality. For a few A-stars, ultra-deep Zeeman polarimetric observations have been performed. Surprisingly, these observations revealed the presence of ultra-weak magnetic fields: In Vega a field of 0.6 ± 0.3 G was found (Lignières et al. 2009;Petit et al. 2010), and in the Am star Sirius a field of 0.2 ± 0.1 G has been measured (Petit et al. 2011). Recently a few more Am stars have been discovered to posses ultraweak magnetic fields (Blazère et al. 2016a,b), possibly hinting to an ubiquitous nature of low-amplitude magnetism in these objects. Note that stars with magnetic fields with amplitude between 300 and a few G are not detected (Aurière et al. 2007).
The star Vega also shows a spectroscopic variability revealing the presence of surface structures compatible with stable rotational modulation of hot or cold stellar spots (Böhm et al. 2015), with some features apparently stable on long timescales, and other evolving on timescales of days (Petit et al. 2017a). The presence of spots in intermediate-mass stars might be wide-spread, with recent Kepler, K2 and TESS observations revealing that the most common variability type among mid-A to late-B stars is a simple periodic variability tentatively associated with rotational modulation of surface spots (Balona 2017;Balona et al. 2019).
In a previous paper (Braithwaite & Cantiello 2013) we introduced the idea that weak fields in A-type stars could be 'failed fossils', fields which are evolving dynamically towards a 'fossil' equilibrium, but have not yet arrived there. Since the field evolves dynamically on a timescale τ evol ∼ τ 2 A Ω, where τ A and Ω are the Alfvén timescale and the rotational angular velocity, if the field is weak and the rotation fast, the field evolves very slowly. Equating the age of Vega and Sirius to this dynamical evolution timescale gives a field strength of order 10 G. Here we will discuss an alternative explanation, dynamo-generated magnetic fields originating in the subsurface convective layer driven by second helium ionization.
In this paper we investigate the presence and observational consequences of subsurface convective layers in intermediate-mass stars. In Sect. 2 we discuss the physics and occurrence of convection in the envelopes of intermediate stars. In Sect. 3 the magnetic fields produced within the convective layers and their appearance at the surface is examined. We look at the observational consequences of these surface magnetic fields in Sect. 4, and discuss the specific case of the star Vega in Sect. 5. We summarize current ideas for the possible sources of magnetism in A stars in Sect. 6. We discuss the results and conclude in Sects. 7 and 8.

OCCURRENCE OF CONVECTION
According to the Schwarzschild criterion, convection occurs when the radiative gradient becomes larger than the adiabatic one. That is where F is the flux density, κ is the opacity and ∇ ad ≡ (∂ ln T /∂ ln P ) ad is the change in temperature in response to an adiabatic change in pressure. This comes from the equation of radiative transfer and the equation of hydrostatic equilibrium. Defining the following quantities we can rewrite the condition for convection as In intermediate-mass stars during the main sequence, radiation pressure is small compared to ideal-gas pressure and ∇ ad ≈ 2/5 away from ionization zones, and there is no convection in the bulk of the star's volume. Both ∇ F and ∇ g are −∞ in the very centre of the star, pass through zero at some radius and are positive beyond that radius. Now, because of the steep dependence on temperature of the reaction rate of the CNO cycle, much steeper than the p-p chain ( pp ∝ ρT 4 , while CNO ∝ ρT 18 ), nuclear heating is very centrally concentrated in early-type stars. Consequently, moving outwards from the centre ∇ F turns from negative to positive at a much smaller radius than does ∇ g and ∇ F − ∇ g is positive in the core of the star, giving rise to convection. Values of opacity κ and adiabatic gradient ∇ ad as function of temperature in the outer regions of a stellar model with mass 2.4 M and core hydrogen fraction Xc = 0.47. The stellar surface is located to the right. Convective regions are shaded grey, and we annotate the location of the species undergoing partial ionization and driving convection. Note that, despite the presence of an opacity peak, the Fe convection zone is not present because of the insufficient luminosity of this model.
In contrast to this, near the stellar surface both ∇ F and ∇ g are small and cancel each other out almost perfectly since the outer layers of the star contain very little mass and produce no nuclear energy. For convection we need therefore either a large opacity gradient ∇ κ (i.e. opacity increasing inwards), and/or a high heat capac-ity and consequently low ∇ ad 1 , see Fig. 1. We explore how this happens in the following section.

Envelope Convection
At or near the surface of the star where abundant elements have ionization thresholds, bumps in the heat capacity and opacity do indeed result in convective layers. We call these HCZ, HeICZ, HeIICZ and FeCZ according to the species ionized there. We use the Modules for Experiments in Stellar Evolution (MESA, release 11342) to evolve non-rotating stellar models with masses between 0.9 and 25 M from the pre-main-sequence to close to the end of core H-burning 2 (Paxton et al. 2011(Paxton et al. , 2013(Paxton et al. , 2015(Paxton et al. , 2018(Paxton et al. , 2019. The models have an initial metallicity of Z = 0.02 with a mixture taken from Asplund et al. (2005). Convective regions are calculated using the mixing length theory (MLT) in the Henyey et al. (1965) formulation with α MLT = 1.6, though we do check in section 7.2 how our results depend on the α MLT parameter. The boundaries of convective regions are determined using the Schwarzschild criterion. An exponentially decaying overshoot above and below convective regions is accounted for with a parameter α ov = 0.014 (Herwig 2000;Paxton et al. 2011). Since we are just focusing on the convective properties of A and late B-type stars, we do not include the effect of stellar winds, which are basically negligible for the main-sequence evolution of these stars The location of convection in solar-metallicity mainsequence stars between 0.9 and 25 M is illustrated in Fig. 2. In stars above about 1.5 M there is no thick convective envelope, just various thin convective layers, each occurring at a particular temperature. At low temperatures, ionization of H and HeI together produce one surface convective layer. Moving from lower to higher masses, each convective layer disappears as the photospheric temperature rises above each ionization temperature. This manifests itself in the locations on the HR diagramof the boundaries separating stars with different numbers of convective layers, as seen in Fig. 3. In our 1D models surface convection completely disappears around a temperature 10-11,000 K, with hotter models showing only subsurface convection zones.
1 Conceptually one can draw a parallel here with cumulonimbus clouds: convection caused by heating from below can rise to great heights above the cloud base, driven by the release of latent heat, analogous to heat from recombination of ionised species. Convection inside a cloud requires a temperature gradient ('lapse rate' in atmospheric parlance) of as little as 3 • C/km, as opposed to 10 • C/km in non-saturated air.
2 Defined as the point when the center mass fraction of H is HeI H Fe H HeII Convective Core Figure 2. Normalized radial extension of core, surface and subsurface convection zones for stars in the mass range 0.9-25 M . The models are extracted during the main sequence when the center mass fraction of H is 0.5. The convective regions are associated with ionization of H, He (HeI and HeII) and iron peak elements (Fe). The stellar surface r/R * = 1 is defined as the location corresponding to optical depth τ = 2/3. Solar-metallicity stars more massive than about 7 M have an iron-ionization convective layer, the FeCZ (Cantiello et al. 2009). In contrast to the other envelope convection zones (HCZ, HeICZ and HeIICZ) which are always present when their relevant ionization temperatures occur inside the star, the FeCZ occurs only in more massive stars, even though the ionisation transition zone at 1.5×10 5 K is present in all stars. This can be explained as follows. The LHS of equation (3) is essentially the same function of temperature in all stars since opacity and therefore also ∇ κ depend almost exclusively on temperature and only very weakly on pressure, and because (as discussed above) ∇ F − ∇ g ≈ 0. The difference between intermediate-mass stars and massive stars is on the RHS -in more massive stars the radiation pressure P rad = (a/3)T 4 accounts for a greater fraction of the total pressure P , the specific heat capac-ities are correspondingly greater. To be more precise, in the absence of ionisation effects the value of ∇ ad goes from 2/5 in the limit of a monatomic ideal gas towards 1/4 as radiation pressure becomes dominant. And from equation (1) we see that the quantity gT 4 /F P is also the same function of temperature in all stars, which can be rearranged to give the radiative pressure fraction as P rad /P ∝ T 4 eff /g surf ∝ L/M , where the latter is a measure of proximity to the Eddington limit. Plotting stellar models of fixed composition on an HR diagram, the threshold for the existence of the FeCZ is indeed a line of constant T 4 eff /g surf , which is approximately horizontal -convection is present for a luminosity above about 10 3.2 L at Z = 0.02 ( Fig. 11 in Cantiello et al. 2009).
Note that all of the subsurface convective layers are around 1 to 1.5 pressure scale heights in thickness. The  reason for this can be seen in Fig. 1: the opacity peaks are around 0.15 dex wide in temperature, and in pressure they have a width a factor 1/∇ greater than this. Given that ∇ ≈ 2/5, this corresponds to a factor of e in pressure or a little more.
As stars move along the main sequence, convective layers can appear, disappear, merge and demerge. In Fig. 4 and 5 we illustrate the evolution of these layers in a stellar model with 2.4 M . Note that due to the very low densities in the outer layers (ρ < 10 −7 g cm −3 ), these convective regions contain very little mass. As such, they are completely invisible in the usual Kippenhahan plot showing the evolution of the internal structure in Lagrangian mass coordinate (See e.g. Fig. 4).
In terms of the convective kinetic energy density, the most energetic of the layers is the deepest one, which between about 1.5 and 7 M is the HeIICZ. In Table 1 we show the properties of the HeIICZ and the overlying radiative layer (ignoring the presence of the weaker convective layers) in 2, 2.4 and 4 M models during core H-burning.

Weak convection
In the HeIICZ the transport of energy by convective motions is relatively inefficient: radiation dominates and transports more than 95% of the total flux. This is because the density is very low and the mean free path of photons correspondingly long. In this situation convection is significantly superadiabatic, and the gradient ∇ ≡ d ln T /d ln P is explicitly calculated from the mixing length equations (e.g. Kippenhahn & Weigert 1990).
The convection in the HeICZ and photospheric HCZ is even weaker than in the HeIICZ. The calculations presented so far have ignored the role of viscosity, as is common practice in stellar modelling, using simply the Schwarzschild criterion appropriate for convection at high Reynolds number. In a viscous fluid the instability condition can be expressed in terms of the so-called Rayleigh number Ra as where again ∇ and ∇ ad are the actual and adiabatic temperature gradients, χ an ν are the thermal and kinetic diffusivities, g is gravity and L is some relevant length scale in the vertical direction, presumably either the vertical extent of the convective zone or the scale height if that is smaller. The value of Ra crit can be determined experimentally but varies by a factor of 2 or 3 depending on the boundary conditions. Note that the presence of rotation also alters the value of Ra crit . We calculated the Rayleigh number in each convective layer in a 2.4 M model with an effective temperature T eff = 9560 K (we chose this specific model to reproduce the conditions of Vega, a well-known A-type star).
Using the numbers at the location in each layer of peak convective energy density ρv 2 c /2, we find Ra ≈ 10 2 , 10 3 and 10 7 in the HCZ, HeICZ and HeIICZ respectively. The reason for the difference in Ra between the layers is largely a consequence of the density: at lower density The normalized radial coordinate is shown as function of stellar age. We plot the outer 2% of the star to highlight the small envelope convective regions that are driven by partial ionization of H, HeI and HeII, respectively. Green hatched regions are convective, purple crossed regions show exponentially-decaying overshooting. In the calculations, the H and HeI convection regions merge at t 460 Myr.
the mean free path of the photons, which carry both heat and momentum, is greater and both thermal and kinetic diffusivity are higher. Indeed at the photosphere the mean free path is comparable to the scale height. In addition, the scale height used in the numerator in Eq.(4) is smaller closer to the surface.
It is not well understood how convection should look at low Rayleigh number; there should perhaps be some kind of viscous, non-turbulent motion. Another uncertainty is our limited inability to predict the temperature gradient and convective velocities accurately; we currently use mixing length theory. Although standard in stellar evolution modelling, we see from laboratory experiments and numerical simulations, as well as the experience of glider pilots, that mixing length theory is based on an inaccurate physical picture. In reality rising and falling fluid parcels move past each other rather than mixing, surviving over many scale heights; heating and cooling at the boundaries is crucial. In the absence of a quantitative theory based on real physics we use the MLT in the modelling; the numbers should therefore be treated as the result of a dimensional analysis, and their dependence on the mixing length free parameter α MLT should neither worry nor surprise us. In the literature a number of works have attempted at simulating these convective regions using multi-dimensional hydro simulations, although mostly for cool A stars with surface temperatures below 8,500 K (see e.g. Kupka & Montgomery 2002;Trampedach 2004;Kochukhov et al. 2007;Freytag et al. 2012;Kupka & Muthsam 2017). For the more inefficient convective regions arising in hotter A and early B-type stars, the situation still needs to be clarified. This could be done with the aid of stateof-the-art radiation hydro simulations, similar to those of Jiang et al. (2015) but for much lower values of the stellar luminosity. Observationally, the transition from convective to radiative surfaces seems to occur at surface temperatures between 9,000 and 10,000 K, depending on the proxy. This is marginally consistent with the results shown in Fig. 2 and Fig. 3, where surface convection as calculated using the MLT disappears at around 10,000-11,000 K. Landstreet et al. (2009) find microturbulent velocities in the photospheres of stars to be approximately 2 km s −1 in stars cooler than 10,000 K, while above that temperature there is an upper limit of around 1 km s −1 . The microturbulent velocity is interpreted as convective line broadening, but also internal gravity waves coming from the HeIICZ could contribute (Cantiello et al. 2009). Chromospheric activity indicators and large line profile asymmetries are also present in stars cooler than about 8,250 K (logT eff < 3.92 ) (Simon et al. 2002;Landstreet et al. 2009), a temperature that coincides pretty well with the transition to largely inefficient surface H convection (see Fig. 6 and 7).

MAGNETISM
The presence of convection zones close to the surface of A stars opens the possibility that magnetic fields could be produced by dynamo action and reach the surface, for example via magnetic buoyancy. Below we discuss this hypothesis.

Dynamo Action
In an astrophysical plasma a dynamo is a configuration of the flow which is able to generate a magnetic field and sustain it against Ohmic dissipation. Depending on the scale of the resulting magnetic field with respect to the scale of kinetic energy injection, dynamos can be divided into small and large scale. In large scale dynamos the field has correlation length bigger than the forcing scale in the flow, while small scale dynamos result in magnetic fields with correlation scale of order of or smaller than the forcing scale. It is generally considered that large-scale dynamos require fast rotation, characterised by a low Rossby number (the ratio of rotation period to convective turnover time), as well as perhaps differential rotation.
In principle the HeIICZ could host a small-scale dynamo. Moreover, most intermediate-mass stars rotate rapidly, with rotation periods of 12 hours or 1 day, which corresponds to a rotational period of the order of the convective turnover timescale (Rossby number is in the range 1...10), so it may be possible to build magnetic structure on a larger length scale than that of the convective motion. Assuming the dynamo produces a magnetic energy density equal to the convective kinetic energy density, we calculate magnetic field strengths up to a few hundred gauss inside the HeIICZ -see Fig. 6. This assumption is supported by numerical simulations showing dynamo excitation by convection in the presence of rotation and shear, which also show magnetic fields reaching equipartition on scales larger than the scale of convection (Käpylä et al. 2008;Cantiello et al. 2010).
Hence, the nature of the dynamo action in the HeI-ICZ could depend on parameters like the stellar rotation and the shear profile. The dynamo may also be affected by a fossil or failed fossil large-scale magnetic field penetrating upwards from the radiative zone below (see Sect. 7). In Fig. 8 we show the expected maximum magnetic field inside any envelope convection region, assuming equipartition of magnetic and kinetic energy: where we adopted the maximum value of the ρv 2 c inside the convective zones as computed in the non-rotating models. Due to the higher power dependency on the velocity, the location of the maximum of ρv 2 c always roughly corresponds to the maximum of v c . Values of magnetic fields calculated using the average convective velocity and density typically differ by less than 30%. For models in the range 1.5 to 5 M and for temperatures above log T eff 3.85, the HeIICZ is the convective zone hosting the strongest equipartition magnetic fields. The HCZ contributes with the strongest fields, but only for the cooler models in the lower corner of the plot.  Figure 8. Maximum magnetic field as function of location in the HR diagramin any envelope convection zone calculated assuming equipartition between convective energy density and magnetic energy density. This plot is based on main-sequence evolutionary models between 1.5 M and 5 M with Galactic metallicity (Z=0.02). The convective properties are calculated using the mixing length theory. Some evolutionary tracks are shown for references.

Magnetic Fields Rise
Now that we have established a substantial magnetic field can in principle be generated by dynamo action in the HeIICZ, we would like to know how it could rise through the overlying radiative layer and reach the photosphere. In Cantiello & Braithwaite 2011 we compared various mechanisms to bring magnetic field upwards. Upwards advection by mass loss and Ohmic diffusion are both slow, and convective overshoot is unlikely to bridge the gap between the HeIICZ and the stellar photosphere (see e.g. Fig. 5), but buoyancy can bring field to the surface on the dynamic (Alfvén) timescale.
A magnetic field provides pressure without contributing to density, so a magnetic feature which is in pressure equilibrium with its surroundings must have a lower temperature in order to have the same density and avoid rising buoyantly; the result is inwards diffusion of heat. In this context the mean free path of photons is large and heat diffusion keeps magnetic features at roughly the same temperature as their surroundings. Consequently it rises at a speed limited by aerodynamic drag, which works out to be where l is the size of the magnetic feature and c s is the sound speed. Note that this buoyant rise happens at essentially the same speed as the adiabatic magnetic buoyancy instability (Newcomb 1961;Parker 1966), which may also be relevant here. For a magnetic feature with l ∼ H P and β ≈ 500, the time taken to rise one scale height is of order 5 hours in our Vega model. The difference between the field strengths at the top and bottom of the radiative layer depends on its geometry. In a self-contained magnetic feature (a 'blob' or 'plasmoid') the field strength scales as B ∝ ρ 2/3 as it rises. Given that P ∝ ρ 4/3 in the radiative layer (approximately, since ∇ ≈ 1/4), we see that β remains constant during the rise. Such plasmoids might however be difficult to detach from the convective layer. An alternative geometry would be a horizontal flux tube, where the scaling is B ∝ ρ. More realistic is a sunspot-like arch, where the central section of the tube rises to the surface while its ends are still in the convective layer, allowing plasma to flow downwards along the tube. Since the temperature inside and outside the tube are essentially the same, the pressure scale heights are also roughly equal inside and outside.
This means that the plasma-β is equal along the length of the tube: we have the same scaling with density B ∝ ρ 2/3 as with the plasmoid scenario. In Fig. 9 we show the expected amplitude of surface magnetic fields, calculated assuming buoyant rise of the equipartition fields shown in Fig. 8 (a scaling B ∝ ρ 2/3 as the feature rises).
Note that there could be other ways for a magnetic field to escape the subsurface convection region and reach the stellar surface. For example, Warnecke & Brandenburg (2010); Warnecke et al. (2011) studied the magnetic flux produced by a turbulent dynamo in Cartesian and spherical geometry, respectively. They found that magnetic flux can rise above the turbulent region without the need of magnetic buoyancy. This appears to be related to the release of magnetic tension, which leads to the relaxation and emergence of the field. In this case the magnetic field at the surface could be larger than in the case of magnetic buoyancy. Therefore, the values of surface magnetic fields reported in Fig. 9 should be taken as lower estimates (but see also the discussion on the dependency of the equipartition magnetic fields on α MLT in Sec. 7.2). Even in the absence of a dynamic process bringing the dynamo-generated magnetic fields to the surface, it is important to notice that the radiative layer separating the HeIICZ from the surface contains very little mass. Even the very weak stellar winds of A-type stars can easily remove this mass on a timescale of a few hundred years or so (see Tab. 1). Therefore the material present at the surface of an A star has been recently stirred by turbulent convection. Magnetic fields produced by a convective dynamo tend to decay rapidly (on an Alfvén timescale) when they are not constantly regenerated, but in the presence of the rapid rotation typical of A stars, this process can be delayed substantially by the stabilizing effect of the Coriolis force (Braithwaite & Cantiello 2013). Hence, the stellar plasma might still be substantially magnetized by the time the layers are revealed to the surface by stellar winds.

Magnetic Field Variability
Once a magnetic feature reaches the surface of the star it would be useful to estimate its lifetime τ spot . As a lower limit for τ spot we could take the Alfvén crossing time, or equivalently the time a feature of size l takes to cross the photosphere while rising with a velocity v drag . For l ∼ H P this gives a timescale of the order of a few hours. Unlike in more massive stars, the upper limit to the lifetime from the removal of the spot by the loss into the wind of the gas it is threading is very long, since the mass-loss rate is very small. A more relevant upper limit is probably set by the dynamo properties. Magnetic features should probably persist for at least the smallest imaginable dynamo timescale, the convective turnover time, which is less than a day. However, with the aid of rotational effects, greater dynamo timescales could be present. If large scale magnetic fields are produced, these could be stable on much longer timescales, akin to the long timescales of field-reversals observed in some stars (∼ years). A co-existence of short-lived and longlived magnetic features is also possible, and required to explain recent spots evolution observations of Petit et al.  Figure 9. Values of expected surface magnetic fields (in gauss) as a function of location in the HR diagram. This plot is based on main-sequence evolutionary models between 1.5 M and 5 M with Galactic metallicity. Some evolutionary tracks are shown for references. The surface magnetic fields are calculated scaling the equipartition fields in the envelope convection zones (see Fig. 8) as ρ 2/3 (see discussion in Sect. 4). The star symbols correspond to the locations of known magnetic (non Ap) A-stars, having surface magnetic fields of the order ∼ 1−5 G. For these stars the predicted surface magnetic fields from subsurface convection is ∼ 2 − 4 G. The stars θ Leo and Alhena have almost identical positions in the HR diagram.
As far as direct detection of the magnetic field from spectropolarimetric observations of the Zeeman effect is concerned, the most readily measured quantity is the mean longitudinal field, i.e. the disc-averaged line-ofsight component. The detectability depends on the field strength and geometry. Unfortunately it is not obvious what the geometry might be. On the entire surface of the Sun we see magnetic structure on the granulation scale: a small-scale local dynamo located near the surface. If the A-star dynamo looks like this, and the field everywhere is able to escape upwards, the entire photosphere will be covered in randomly-oriented magnetic field with a length scale comparable to the scale height in the HeII zone, H c . Assuming √ N statistics in the disc-averaging, the observed mean longitudinal field would be where B surf is the surface field strength as calculated in the previous section. In our Vega model B surf ∼5 gauss and B long ∼ B surf /400, which is completely unobservable with current technology and also incompatible with the measured value longitudinal field of 0.6 ± 0.3 gauss (Lignières et al. 2009). Actually even √ N statistics seems optimistic since it assumes the polarity of a region is random and independent of its neighbours, which is unlikely to be the case.
Perhaps though the length scale at the surface is larger than H c , since magnetic features expand as they rise towards the stellar surface; their size would be greater by a factor (ρ c /ρ ph ) 1/3 . Unfortunately this is still insufficient to explain the observations. It is possible however for dynamos to produce structure larger than the convective scale. In terms of observational evidence, we see that fully convective stars generally have strong dipolar fields, but that stars with a convective envelope such as the Sun have weaker dipole fields and that most of the energy is at smaller scales (see e.g. Morin et al. 2010;Gregory et al. 2012). Intuitively this is understandable in terms of the difficulty in different parts of a convective shell 'communicating' with each other to produce coherent large-scale structures. Probably the thinner the shell is, the more serious is this problem. Differential rotation probably helps though to connect different parts of a convective shell, probably most effectively in the azimuthal direction. Sunspots are produced by some process around the base of the convective envelope; the active regions we see at the surface are no larger than the scale height at that depth. With only a very thin convective layer to work with, it is difficult to imagine producing large active regions or spots on an A star.

Photometric Variability
Apart from the Zeeman effect, a magnetic field has various potentially-observable indirect effects. For instance, in general a magnetic field affects the temperature of a radiative photosphere. The photosphere is at a constant optical depth, but lower inside magnetic features because of the contribution of magnetic pressure. Since temperature is a function of height, magnetic spots appear hotter and brighter than their surroundings 3 . The temperature difference is given by (Cantiello & Braithwaite 2011) which in Vega is only ∼ 10 K if T = 10 4 K and β = 500, corresponding to a difference in flux density of less than 1%. If the spot is larger than the photospheric scale height, transport of heat between outside and inside the spot is less effective and temperature is no longer purely a function of height, so the photospheric temperature difference is likely smaller. Whilst the effect might just be observable on more massive stars, it might be too small to explain the observations of Böhm et al. (2015) of Vega, who find photometric variability which they model as a flux density difference of 5 10 −4 in a large spot with a radius equal of 0.3 R * . Perhaps the observations could also be reproduced with a large number of smaller and somewhat stronger spots (Petit et al. 2017a). Rotational modulation of surface structures akin to stellar spots has been reported in a large number of B and A stars observed by Kepler and TESS (Balona 2011;Balona et al. 2019;Pedersen et al. 2019). In Fig. 10 we show the location of possible rotational variable stars in Balona et al. (2019), together with the predicted surface magnetic fields coming from subsurface convective regions. While it is difficult to make firm conclusions, it is interesting to note a dearth of rotational variables candidates in the region corresponding to minimum predicted surface magnetic fields. In the near future, more observations coming from TESS should help to further explore this correlation.

Flares
There is some evidence of flares in Am/A stars (Balona 2013). Although normally one can invoke an otherwise undetected low-mass companion to explain flares (and also X-rays) Pedersen et al. (see e.g. 2017), there are at least a few cases where the flare energy is probably too large for this to be plausible. Explaining these energetic flares with a subsurface magnetic dynamo and associated coronal activity is also not easy.
In the Sun, flares are believed to be produced by magnetic reconnection in strongly magnetized regions (sunspots) having scales L ∼ 0.01 R and B ∼ kG. In the case of very efficient energy conversion, flares can have energies as high as E flare ≈ B 2 L 3 ∼ 10 32 erg. In the case of an A star like Vega, where the magnetic field is about two orders of magnitude smaller, one needs magnetic fields concentrations on scales larger than the stellar diameter to explain the observed maximum energy E flare ∼ 10 36 erg (Balona 2012(Balona , 2013, which is clearly not possible. Moreover, far ultraviolet observations of A stars have shown that chromospheric activity seems to disappear for surface temperatures above 8,250 K (Simon et al. 2002).
This said, given the typical flares recurrence time τ of 10-100 days, one can still accommodate them via a build-up of magnetic energy within the HeIICZ or in the radiative layer above it. For a typical A star, the con- vective luminosity L c (the rate at which energy passes through the convective motion, of order ρv 3 c per unit area) is a fraction 10 −2 − 10 −3 of the total stellar luminosity (see Fig. 6). Again, assuming equipartition of kinetic energy density with magnetic energy density and the ability of magnetic fields to store a small fraction f of the integrated convective luminosity during the recurrence time, one can power flares with energy as large as which for a typical A-star only requires f ∼ 10 −3 or so to reach 10 36 erg. Of course this would imply that the flares in A stars are produced in a very different way than in Sun-like stars, something that needs further observational and theoretical studies.

VEGA
The prototype A0 star Vega is a rapid rotator, with extensive monitoring in spectropolarimetry, photometry and interferometry. Vega is the first A star for which a weak surface magnetic was reported (Lignières et al. 2009). The magnetic field has a 0.6±0.3 G disk-averaged line-of-sight component, with peak values of 7 G (Petit et al. 2014(Petit et al. , 2017b. The magnetic topology was reconstructed using Zeeman-Doppler imaging, which shows a prominent polar magnetic region and a few other magnetic spots at lower latitude. Looking at our Vega model in Tab. 1 (M ini = 2.4 M ), we can see that the turnover time in the HeIICZ is about 6 hours. Since the rotation period of Vega is only 0.68 d, the Rossby number is order unity (Fig. 11) and a convective dynamo in this envelope convection zone is expected to be efficient at creating an equipartition magnetic field. While this is possibly the case for the HCZ and HeICZ, in the context of the MLT these convective regions contain negligible kinetic energy densities and are of no interest for the problem of explaining the observed surface magnetic fields. At the location of Vega, the calculated model has B eq =35...86 G in the HeIICZ, depending if we take average or max convective velocity. Assuming the usual ρ 2/3 (Cantiello & Braithwaite 2011) scaling, buoyant surface magnetic fields can reach 2...5 G, pretty close to the maximum observed value of ∼ 7 G at the pole of the star (Petit et al. 2014). It is not possible to say much about the geometry of the magnetic field, as this requires a careful study of dynamo action in the thin HeIICZ.
Strong evidence that Vega shows surface structures has been reported by Böhm et al. (2015), who used high resolution spectroscopy to reveal line profile variability. The variability is compatible with rotational modulation of hot or cold starspots with a lifetime longer than about 5 days. Further inspection has shown a complex behavior, with a number of surface structures that appear stable, and others evolving on timescales of days (Petit et al. 2017a). These starspots might be caused by the presence of small scale, weak magnetic fields at the stellar surface. If this correspondence is confirmed, the rapid evolution of the surface features would support a dynamo-generated origin of ultra-weak magnetism in A-stars.

SUMMARY OF POSSIBLE SOURCES OF MAGNETISM IN A STARS
Strong magnetic fields are found in a small fraction of A stars (the Ap phenomenon, which affects 5-10% of A stars). These magnetic fields might be inherited during the star formation process, or generated in a pre main sequence convective dynamo phase or during a stellar merger. Magnetic fields with amplitude between 300 and a few G are not detected (the so-called "magnetic desert" Aurière et al. 2007). The ultra-weak magnetic fields discussed in this paper, with surface amplitudes below a few G, might be common in A stars. We have proposed two possible scenarios Top: Convective velocities as function of temperature in the outer layers of a 2.4 M model with T eff = 9560 K representative of the star Vega. The stellar surface is to the right. The velocities are in log (cm/s) and have been calculated using a value of the mixing length parameter αMLT = 1.6. We also show the opacity and label the convective zones according to their origin (partial ionization of He or H). Bottom: profiles of the Rossby number and the equipartition magnetic field in the outer layers of the model. The Rossby number is calculated assuming a rotation period of 13 hours, appropriate for the rapidly rotating star Vega.
for their origin, failed-fossils (Braithwaite & Cantiello 2013) and dynamo-generated fields from the HeIICZ (this work). These two scenarios make different predictions for the amplitude and evolution of the magnetic field, as well as for the associated surface activity. Failed fossils should constantly decrease in amplitude as stars evolve on the main sequence, while during the same evolutionary phase the amplitude of dynamo generated fields is expected to increase (see e.g. Fig. 9). Moreover, dynamo-generated magnetic fields might have small-scales, rapidly-evolving features that are constantly regenerated, while in the fossil fields scenario small-scale features are expected to be removed quickly, leaving behind only the larger scales. This also means that stars with only failed fossil fields should be relatively inactive, while stars hosting HeIICZ dynamogenerated fields could show some level of activity, although predicting exactly at which level is challenging (see Sec. 4).
Another possibility is a hybrid failed-fossil-dynamo system. From the theoretical point of view it seems to be difficult to get completely rid of a weak large-scale field, that this field should not be strong enough to suppress subsurface convection, and that there should be some kind of convective dynamo producing a magnetic field. Unfortunately we don't know much about this dynamo and in particular whether and how it could produce large length scales. In the event that a thin-shell dynamo cannot produce the observed large length scales on its own, or even with the help of smearing out by differential rotation, a plausible solution would be for the dynamo to be given some large-scale structure or polarity-bias by an underlying failed-fossil field. , for a review). These are fossil fields, anchored deep in the stellar interior. There is a one-to-one correlation (Aurière et al. 2007) between these strong magnetic fields and chemical peculiarities at the surface caused by gravitational settling and radiative levitation, processes that are usually washed out by convection and surface turbulence in other A stars. This strongly suggests that a magnetic field can suppress at least some of the convection.
A sufficiently strong field does indeed suppress convection, as in sunspots, forcing an increase in temperature gradient so that the entire energy flux is transported radiatively. However, it is not obvious where the field strength threshold should be. One might naïvely expect convection to be suppressed by a field of greater energy density than the kinetic energy in the convective motion. However the work of Gough & Tayler (1966), Moss & Tayler (1969) and Mestel (1970) suggests that in that case the temperature gradient simply steepens further above the adiabatic gradient until convection resumes, and that to suppress convection completely, a field at equipartition with the thermal energy, rather than the convection kinetic energy, is required. However, these studies consider a situation where the energy flux is entirely convective, such as is approximately the case in the bulk of the solar convective zone. In ABO-star subsurface convective layers, the situation is different in that only a small fraction (∼ 5% or less) of the stellar heat flux is carried by convection, and that the temperature gradient is already significantly above adiabatic. It may be then that the threshold in this context is intermediate between convective and thermal equipartition.
An important clue comes from recent observations. Sundqvist (2014) looked at a sample of O stars with and without detected magnetic fields, finding that whilst one star with a 20 kG field (NGC 1624-2) lacks measurable macroturbulence, the other stars in the sample, which have fields up to 2.5 kG, all display macroturbulent velocities of at least 20 km s −1 . This result is consistent with the threshold for suppression of convection being equipartition with thermal energy, and probably incompatible with the threshold being equipartition with the convective energy, since equipartition field strengths for the stars in this sample are about 1-2 kG (Cantiello & Braithwaite 2011). A larger sample including stars with fields between 2.5 and 20 kG should shed more light on the situation in the future.
In A stars the field strength thresholds for suppression of convection can simply be taken from the lower plate of Fig. 6, equipartition with either convection or pressure. In the convective equipartition hypothesis, all subsurface convection should be suppressed in Ap stars. If however equipartition with thermal pressure is required, the threshold for HeII convection suppression is around 3 kG, so that convection would be present in the weaker-field Ap stars, and even HeI convection may be present in less massive Ap stars at the bottom of the field-strength distribution. This suppression would have consequences on observables connected to this convection, e.g. microturbulence, and chemical abundances, as mentioned above.
Apart from Ap/Bp stars it is likely that the rest of the A and late-B population harbour weaker largescale fields in their interiors. A convective dynamo during the pre-main sequence will leave behind a magnetic field which decays on the main sequence on a dynamic timescale given in terms of the Alfvén timescale and the star's rotation by τ 2 A Ω, which goes to infinity as the field strength goes to zero. The field can therefore never disappear completely because the weaker it gets, the more slowly it decays. In Braithwaite & Cantiello (2013) we predicted, by equating this decay timescale to the stellar age, internal field strengths in Vega and Sirius of around 20 and 7 gauss respectively, with somewhat weaker fields at the surface. Unable to suppress convection, these fields would co-exist with it. That a large-scale field could be screened somehow below the convective layer, as suggested for instance by Gough & McIntyre (1998), seems impossible (Braithwaite & Spruit 2017).

Dependency on α MLT
In the case of efficient convection the velocities calculated by the Mixing Length Theory have a weak dependence on the unknown mixing length parameter v c ∝ α 1/3 MLT (see Appendix A). In the case of the (sub)surface convection zones studied here, convection is very inefficient. The small energy excess content carried by the convective element is lost before it can be advected because the thermal timescale of the convective element is comparable to the dynamical timescale of the convective motion. This is quantified by the Peclet number, which measures the ratio between the thermal and the dynamical timescale (see e.g. Maeder 2009). The convective zones studied in this work have all small Peclet numbers. In the case of inefficient (non-adiabatic) convection, the MLT has to solve a cubic equation and the resulting dependency of the convective velocities on the uncertain α MLT parameter is much steeper, v c ∝ α 3 MLT (Appendix A). It is difficult to say what exact value of the α MLT parameter is needed to reproduce the properties of stellar convection in these regions. When compared to 2D and 3D numerical simulations, a range of values between 1 and 2 are usually discussed (see e.g. Kupka & Muthsam 2017), so that the values of velocity and resulting equipartition magnetic fields calculated in this work should be considered only as order of magnitude estimates. In Fig. 12 we show how some of the relevant properties in our Vega model depend on the choice of the α MLT parameters.

CONCLUSIONS
A complex landscape of surface and subsurface convective regions is present in the outer 2% in radius of A and late B stars. These convection zones are driven by partial ionization of H and He and have thickness comparable to the local pressure scale-height. Being so thin and close to the stellar surface, they are very inefficient, with a tiny amount of flux transported by convection. For temperatures above ≈ 8,000 K, the most efficient convection zone is due to second ionization of He.
In the HeIICZ, convective velocities calculated using the Mixing Length Theory with α MLT = 1.6 result in equipartition magnetic fields of order 100 G for A Stars. For inefficient convection, the velocities calculated in the context of the MLT depend on the α MLT parameter as v c ∝ α 3 MLT . Since the value of the α MLT is uncertain in these regions, the values of velocity and resulting equipartition magnetic fields should be considered only as order of magnitude estimates.
We showed that, among advection, magnetic diffusion and magnetic buoyancy, the most likely process that can bring to surface magnetic fields generated by dynamo action in the subsurface convective zones of A stars is magnetic buoyancy. Interestingly, this process leads to the appearance of surface magnetic fields of amplitude comparable to the fields observed in Vega and in other A Stars with ultra-weak magnetic fields (1...10 G).
These magnetic fields can cause spots, which thanks to rotational modulation can lead to observable photometric variability in A and late B-type stars. These magnetic spots are expected to be bright because the surface is either radiative (for temperatures above 10,000-11,000 K) or convective, but with convection transporting a negligible amount of flux.
The spot temperature contrast is likely small, on the order of 10 K , which translates into less than 1% local intensity fluctuations and a much lower integrated intensity fluctuation, depending on the spots filling factor. The occurrence and detectability of this type of spots decrease moving from A to late B-type stars. We predict regions of the HR diagramwhere (sub)surface convection is unlikely to have any effect, and weak magnetic fields and photometric variability due to magnetic spots should be absent/undetectable in the majority of non Ap/Bp stars. At high luminosities, the appearance of the FeCZ is predicted to lead again to observable effects in early-type stars above log L ∼ 10 3.2 (at solar metallicity, see Cantiello et al. 2009;Cantiello & Braithwaite 2011).
It is not yet clear what the geometry of the field and resulting magnetic spots might look like, as this is related to the type of dynamo at work in the HeIICZ, which we do not investigate here. This said, recent observations of Vega seem to show a relatively complex magnetic field, as well as surface structures evolving on fairly rapidly timescales. Further theoretical investigations are required to check if a dynamo in the tiny convective envelope regions of A stars can reproduce these observations.
The scenario described in this paper represents an alternative to Braithwaite & Cantiello (2013) for explaining the presence of ultra-weak magnetic fields in A stars. Interestingly, the failed fossil field hypothesis described in our previous work makes different predictions than the dynamo-generated field scenario discussed in this paper. Dynamo-generated magnetic fields are expected to have small-scale, rapidly-evolving features, contrary to slowly-evolving, larger scale failed fossils. Moreover, the amplitude of surface magnetic fields as function of stellar age is expected to decrease in the failed fossil scenario, and increase in the dynamo-generated field scenario. Therefore, the rapidly increasing number of detections and observations of ultra-weak magnetic fields in intermediate stars, should allow to determine which scenario, if any, is to favor for the origin of this intriguing type of stellar magnetism.
MC thanks Alfio Bonanno, Fabio Del Sordo, Gustavo Guerrero, Pablo Marchant, Keaton Burns and Daniel Lecoanet for some very useful conversations on the topic of this paper. The Center for Computational Astrophysics at the Flatiron Institute is supported by the Simons Foundation.

APPENDIX
A. DEPENDENCY OF CONVECTIVE VELOCITIES ON THE α MLT PARAMETER Following e.g. Cox & Giuli (1968), the three basic equations to be solved involve three unknowns: The ambient temperature gradient ∇, the temperature gradient within a convective element ∇ and the convective efficiency Γ: Here A is essentially the ratio of the convective to the radiative conductivities A ≡ Q 1/2 c P κgρ 5/2 α 2 where with β = P Gas /P . The numerical factor a 0 in A2 is of order 1 and differs slightly depending on different implementation of the MLT. If convection is inefficient, ∇ ≈ ∇ ≈ ∇ r and one can rewrite A3 as Γ (∇ − ∇ )/(∇ r − ∇ ad ).
If we combine this equation for Γ with A1 and A4 we obtain and since v c ∝ α MLT (∇ − ∇ ) 1/2 , we find that v c ∝ α 3 MLT . Note instead that for efficient convection, ∇ ≈ ∇ ≈ ∇ ad and using A2 we find and v c ∝ α 1/3 MLT .