Nearly all the energy impacting Earth's climate comes from the sun, even if it is sometimes indirectly as we shall see.
The sun works as a thermonuclear engine, emitting energy that is released by fusion of hydrogen atoms in the sun's core. A complete description of the inner workings of the sun, including sun spots and the solar wind, are beyond the scope of this book. It is a topic worth reading about though, since the sun supplies the energy needed for life on Earth.
The photons (electromagnetic energy) emitted from the sun reach Earth's orbit in about 8 minutes. The temperature of the "surface" of the sun (the photosphere) is about 5700 K, and has been determined in many ways, including a simple calculation that is included below. From conservation of energy, we can guess what happens. As the light travels away from the sun, it spreads out homogeneously over an expanding spherical shell, so a lot of energy gets spread over a huge area, so the concentration at any particular point decreases with distance from the sun. By the time the energy reaches Earth's orbit, the energy flux (energy per time per area) is only about 1367 W/m², the so-called solar constant. This single number is the beginning point for most of climatology, especially historically.
Using the solar constant, we can calculate Earth's temperature if there were no atmosphere. To do so, we treat the Earth as a blackbody, which means that it is in radiative equilibrium, all the energy that it absorbs (that is, all the energy incident at its surface) is emitted. The Steffan-Boltzmann law law governs blackbody radiation, and can be stated as
where the left-hand side is the flux, which is proportional to the temperature of the blackbody to the fourth power. The is the Steffan-Boltzmann constant, which has a value approximately . The energy flux incident at the Earth is the solar constant, but notice that the solar flux would not fall evenly on the surface of the planet. To account for this, note that the flux is spread uniformly over the projection of hemisphere facing the sun, that is the cross section, , but the energy (on average) is spread over the entire spherical surface, , giving a factor of 1/4. The temperature of this hypothetical Earth is then
In Celsius, that is equal to 278.63 - 273.15 = 5.48 C. That's a very cold globally averaged surface temperature! Luckily, the presence of the atmosphere allows the Earth system to store somewhat more energy; the observed global average temperature is approximately 287 K (14 C), allowing a more comfortable existence for humans.
The light that reaches the sun arrives over a broad range of frequencies, but the peak frequencies are in the visible portion of the electromagnetic spectrum. This can be shown by considering what we know already about the sun. For this exercise, two lengths are crucial, but can be measured quite well: the distance between the Earth and sun and the sun's radius. The average distance from the center of the sun to the center of the earth, which historically defined one astronomical unit, is about . The sun's equatorial radius is about m. Combining these distances with the solar constant () can provide us with an estimate of the sun's effective surface temperature. To derive the temperature, consider the amount of energy reaching the distance from the sun to Earth, i.e. the solar constant. Since the sun is spherical and radiates in all directions, that amount of energy reaches the same distance on the whole surface area of a sphere, with radius of 1 AU, call this radius R. The surface area of this sphere is given by . All this energy has to pass through the sphere defined by the radius of the sun as well, which means a shell with surface area where r is the sun's radius. Because energy is conserved (it doesn't get created or destroyed between the sun and earth), the energy can be equated by
where is the energy flux at the sun's surface. With that flux, the sun's effective surface temperature can be deduced by . Plug in the numbers! We find that K, which is very close to other estimates. Using Wien's Displacement Law, we can determine the maximum emission wavelength at this temperature as , where mK and is called Wien's displacement constant. This wavelength, which comes out to about 503 nm, is the wavelength at which most of the sun's energy is emitted. This value is close to the middle of the visible part of the spectrum, which is why we see the sun as a yellow-orange color when we look at it.
From this simple exercise, we deduce that the sun is close to a blackbody, which is confirmed observationally. What is the peak emission frequency from the Earth? What part of the spectrum is it in? To answer these questions, repeat the use of Wien's law above. The Earth emits at a much lower temperature, so a much longer wavelength, one that is thankfully invisible to human eyes (imagine how difficult it would be to see if the ground were like a lightbulb!).