A simple 1 dimensional single slab (gray) atmosphere model, developed for- and distributed to students taking ATOC214 and introductory course to atmospheric physics. This model is very basic, and performs rudimentary radiative balance calcualtions to find the equilibrium temperature of the earth in certain climate conditions. Radiative contribution from the sun is considered constant, and earth temperature is initialized at 0K. Detailed descriptions of the governing equations for the atmosphere and earth temperatures can be found in earth_temperature.ipynb.
There are two versions of the same model, one is a jupyter notebook type document that is more legible, and is useful for lectures. I used this version in my guest lecture, each section builds on the last in a way that is (intended to be) intuitive. Then there is the second version of the same model which is just a python script. The model uses some basic packages most people will have installed already (numpy and matplotlib for example).
I know this code is not written particularly optimally. A big part of the way is written is to have it be as legible as possible. This is to prevent ostracising students taking ATOC214 who have no background in programming. I am aware that there are more efficient ways to write this!