This code is transcribed from work done by Sandeep Sahany and Frances J. Neelin, among others, to plot entrainment effects on vertical temperature profiles.