2.3
Integrative/immersive learning of Python in an undergraduate atmospheric thermodynamics course
The author has incorporated a mini crash course in Python programming into the lab section he teaches on Atmospheric Thermodynamics. Because the available class time for focusing on programming skills is extremely limited, a traditional systematic introduction to language syntax and library features is not possible. Instead, an immersive/integrative approach is taken that introduces the student to new concepts and features only as they are needed to complete a particular task. Over the space of about seven weekly 2-hour lab periods, students progress from writing a simple program that simply ingests and parses the raw text data from a radiosonde sounding taken on our own rooftop to creating publication-quality plots of the sounding (including isobars, isotherms, and adiabats), and finally, to implementing and plotting a numerical simulation of the vertical trajectory of a moist parcel with specified initial temperature, dewpoint, and upward velocity.
Each of these tasks builds directly on the program completed during the prior lab period, so the end result is a single program that accomplishes all of the tasks in sequence. Not only does the student learn valuable programming skills, but concepts such as parcel stability, convective inhibition, CAPE, and the Brunt-Vaisaila frequency are reinforced through experimentation with different starting pressure levels and parcel initial conditions. Even object-oriented programming concepts lend themselves to this exercise, as the student is shown how to program the parcel as an instance of a class with attributes such as temperature, pressure, mixing ratio, and upward velocity, and with methods for modifying these properties as the parcel moves.
Most recently, we moved from a traditional source-file-and-command-line program approach to using Ipython Notebook, which has greatly facilitated interactive experimentation and debugging.
It has been the author's experience that many students absorb and learn to apply a working knowledge of Python surprisingly efficiently via this kind of goal-oriented immersion as compared to a more traditional language-oriented approach.