Question: Apparently spectral solar radiation is approximated by a black body at 5800 K. The spectral black body distribution (Planck distribution) is shown below (from Incropera, Fundamentals of Heat and Mass Transfer), with different temperatures including solar radiation at 5800 K.

[![enter image description here](https://i.stack.imgur.com/TP3kf.png)](https://i.stack.imgur.com/TP3kf.png)

1. The heat flux on an Earth surface perpendicular to sun rays (i.e., the solar constant), is roughly 1.36 kilowatts per square meter. Is this simply the integral of the above distribution?
2. Why is the sun approximated as a black body at 5800 K? Does this mean that the surface of the sun which is emitting radiation has a temperature of 5800 K? That seems kind of low.
3. Is solar radiation approximated as a black body at 5800 K only on Earth, or is it the same everywhere? Why don't atmospheric effects and scattering change measurements of the solar spectrum on Earth?

**EDIT:** 
The solar constant is approximated by considering the Stefan-Boltzmann law (i.e., the integration of the spectral solar emission), the size of the sun, and the distance from the sun to Earth. A good derivation is shown here: <https://www.youtube.com/watch?v=DQk04xqvVbU>

Answer: 
As a complement to the other answers, I'd like to point out that if you measure the solar spectrum at a very high resolution, you see very large variations in spectral radiance over very short wavelength scales. Here is a figure that I made for my PhD thesis to illustrate this:

[![High resolution solar spectrum](https://i.stack.imgur.com/afXXl.png)](https://i.stack.imgur.com/afXXl.png)

A high resolution solar spectrum ([source here](http://kurucz.harvard.edu/sun.html)) is plotted in grey and the same spectrum with degraded resolution is plotted in black. The lower panels show close-ups of smaller wavelength regions. This is the solar spectrum as seen from space, i.e. there are no effects from Earth's atmosphere present.

These variations are due to a multitude of absorption lines (normally referred to as [Fraunhofer lines](https://en.wikipedia.org/wiki/Fraunhofer_lines)) caused by absorption from gases in the colder outer parts of the [photosphere](https://en.wikipedia.org/wiki/Photosphere) (and to some extent in the [chromosphere](https://en.wikipedia.org/wiki/Chromosphere)).

Hence, the ~5800 K black body spectrum is not a good description of the solar spectrum at very fine wavelength scales. But it's a reasonable approximation on larger scales.
A point worth mentioning, is that the temperature of the black body may be a bit surprising. This graph might be useful:
[![enter image description here](https://i.stack.imgur.com/Ro9U1.jpg)](https://i.stack.imgur.com/Ro9U1.jpg)
*[graph from libretexts](https://phys.libretexts.org/Bookshelves/Astronomy_and_Cosmology_TextMaps/Map%3A_Astronomy_(OpenStax)/16%3A_The_Sun%3A_A_Nuclear_Powerhouse/16.3%3A_The_Solar_Interior%3A_Theory)*

The core of the sun is many millions of degrees. But we never see that temperature. Its surrounded by a convective zone, to the extent that photons can take millions of years to escape from the core, through the radiative and convection zones, to the surface. At the surface, the sun is indeed only a very modest few thousand degrees. (Although specific phenomenas such as flares may be much hotter)