<P> If ejection is in the direction of the Earth, the particles hitting the upper atmosphere can cause bright auroras, and may even disrupt long range radio communication . It usually takes a day or two for the particles to reach Earth . Flares also occur on other stars, where the term stellar flare applies . </P> <P> On July 23, 2012, a massive, potentially damaging, solar storm (solar flare, coronal mass ejection and electromagnetic radiation) barely missed Earth . According to NASA, there may be as much as a 12% chance of a similar event occurring between 2012 and 2022 . </P> <P> Solar flares affect all layers of the solar atmosphere (photosphere, chromosphere, and corona). The plasma medium is heated to tens of millions of kelvin, while electrons, protons, and heavier ions are accelerated to near the speed of light . Flares produce electromagnetic radiation across the electromagnetic spectrum at all wavelengths, from radio waves to gamma rays . Most of the energy is spread over frequencies outside the visual range and so the majority of the flares are not visible to the naked eye and must be observed with special instruments . Flares occur in active regions around sunspots, where intense magnetic fields penetrate the photosphere to link the corona to the solar interior . Flares are powered by the sudden (timescales of minutes to tens of minutes) release of magnetic energy stored in the corona . The same energy releases may produce coronal mass ejections (CMEs), although the relationship between CMEs and flares is still not well understood . </P> <P> X-rays and UV radiation emitted by solar flares can affect Earth's ionosphere and disrupt long - range radio communications . Direct radio emission at decimetric wavelengths may disturb the operation of radars and other devices that use those frequencies . </P>

Solar flares occur in which layer of the sun
find me the text answering this question