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.
1. The solar constant ($S$) is the energy received per unit area perpendicular to the rays at 1 AU distance (see [wikipedia](https://en.wikipedia.org/wiki/Solar_constant)). Thus, mathematically, it represents the total energy emitted by the sun divided by the surface area of a sphere with a radius of $R$=1 AU:
$$S=\frac{P\_{emitted}}{4\pi R^2}$$
Usually, one can use the [Stefan-Boltzman law](https://en.wikipedia.org/wiki/Stefan%E2%80%93Boltzmann_law) to compute $P\_{emitted}=\sigma T^4\times A\_{Sun}$ by the sun which is considered a black body here and where $A\_{Sun}$ is the total area of the sun's surface, $\sigma$ the Stefan-Boltzmann constant and $T$ the black body's surface temperature. So:
$$S=\sigma T^4\left(\frac{R\_{Sun}}{R}\right)^2\approx1380W/m^2$$
By plugging numbers: $R=$1AU$=150\times 10^9m$, $R\_{Sun}=6.957\times 10^8m$, $T=5800K$ and $\sigma=5.67\times 10^{-8}W/m^2K$, we get approximately the same Solar constant.
2. The definition of a black body is a body that absorbs all incoming radiations and that emits light solely due to it's temperature. In astronomy, since stars are really shiny objects and that they are really distant from each other, they can be considered black bodies since we approximate that the light we get from them is almost entirely emitted by their surface and is not reflected light from another star. In other words, they are approximated by black bodies because we can be pretty sure that the light they emit is solely due to their temperature.
Approximating the sun as a black body effectively means that it's surface temperature is 5800K. And, indeed, if we look at the most dominant wavelength of the sun spectrum, the maximal intensity comes from green wavelength which corresponds to a black body emitting radiation at a temperature of 5800K. For more info look at the [Wien's displacement law.](https://en.wikipedia.org/wiki/Wien%27s_displacement_law)
3. The sun is considered a black body, not only from the perspective of the Earth but from any perspective. The sun's intensity spectrum is roughly the one of a perfect black body minus absorption by the sun's atmosphere and the Earth's atmosphere depending of where we measure the spectrum. See the [sunlight](https://en.wikipedia.org/wiki/Sunlight) article on wikipedia.