Here's the tutorial.

**A "Glass Slab" Model**

Written by Barton Paul Levenson

Now we add an atmosphere to create a "glass slab" model. Model 1 just had two factors affecting the Earth's surface temperature: sunlight and reflection. Model 2 adds IR back-radiation.

The Earth's albedo is assumed to apply to the very top of the atmosphere, giving F = 237 W m

^{-2}from the 342 W m

^{-2}which actually comes from the sun.

The surface absorbs all sunlight and all IR that falls on it. The atmosphere absorbs all IR, but

__no__sunlight. Energy balances for atmosphere and surface, respectively, are:

Atmosphere: \begin{equation}F_s=2F_a\end{equation} Surface: \begin{equation}F+F_a=F_s\end{equation}

Here, F is the incoming sunlight, as defined in model 1 from the Earth's albedo and solar constant. Fa is the amount radiated from the atmosphere--since it has both a top and a bottom, it radiates Fa in each direction. Fs is the amount radiated from the Earth, which only goes up. The atmosphere has Fs from the ground as its only energy input; its output is 2 Fa. The Earth gets both F from the sun and Fa from the atmosphere; its output is Fs.

Assuming perfect emissivity, we can substitute in the Stefan-Boltzmann law to rephrase these equations in terms of temperature:

\begin{equation}\sigma T_s^4=2\sigma T_a^4\end{equation} \begin{equation}F+\sigma T_a^4=\sigma T_s^4\end{equation}

Dividing through all terms by σ to simplify, we get

\begin{equation}T_s^4=2T_a^4\end{equation} \begin{equation}\frac{F}{\sigma}+T_a^4=T_s^4\end{equation}

Ts

^{4}occurs on the left-hand side (LHS) of the top equation and the right-hand side (RHS) of the second. We can therefore eliminate Ts between the two equations and find that

\begin{equation}T_{a}=\left(\frac{F}{\sigma}\right)^{0.25}\end{equation}

And, with more algebra:

\begin{equation}T_{s}=2^{0.25}T_a\end{equation}

yielding Ta = 254 K. Do you recognize the Earth's radiative equilibrium temperature, Te? And Ts = 303 K. The latter figure is 15 K over the actual figure--5% too high--but that's closer than last time.

But Earth's atmosphere isn't equivalent to one blackbody layer in IR-absorbing ability. It's closer to two. We would then have, with layer 1 on top and layer 2 on bottom, and the ground underneath both, T

_{1}= 254 K, T

_{2}= 303 K, and Ts = 335 K, which is too high by 47 K, or 16%. This is worse than model 1! Clearly we're leaving out something important.

**Go Code**

Arrow

I've added the code to the github repository, under the examples directory as model 002. I've reused the code from model 001, including the improvements as described in the sharing post. I'll keep working on model 002. Let me know if you'd like to see anything in particular.