# Do some DIY climate science with this Earth Day coding activity

Apr 18 · 5 min read

Chris Orban, Ohio State University / STEMcoding Project

If you live in a midwestern state like Ohio, whenever Earth Day comes around and the topic of climate change comes up you are in for a particular challenge to explain how serious it is to your fellow human beings. You could talk about how the frequency of hurricanes has increased significantly in the last 20 years, but Ohio doesn’t get hurricanes. You could talk about the historic wildfires and droughts in California, but that’s California, not here. Even explaining that Glacier National Park is running out of glaciers feels a little hollow — Ohio doesn’t have glaciers. How do you explain to a curious soul that a global increase in average temperature of 1.5 Fahrenheit is something to worry about when most of us wouldn’t notice that difference on our home thermostat?

It turns out there is a way to contextualize climate change to your exact location with a little bit of DIY climate science. I came up with the idea for it after ruminating on stories I had heard that, decades ago, people would skate on frozen ponds in our area for weeks in the winter and even the river running through our town would freeze over. I wanted to figure out a way to explain why this doesn’t typically happen anymore.

As I say on this video I made describing my climate hack, I am not a climate scientist. I’m just a physics professor doing my best to show teachers and students how coding can enhance traditional science and math classes with a YouTube channel called STEMcoding. The end product of my “Earth Day coding activity” is an estimate for the average number of days of freezing (T < 32 F) weather at your location that has been lost due to climate change. Put another way, this is how many days that the growing season has expanded due to higher temperatures.

So instead of talking about climate change in terms of 1.5 F versus 2.0 F, or talking about keeping carbon dioxide in the atmosphere under 350 parts per million, you can talk about how many of the coldest days or weeks per year that have, in a sense, disappeared It turns out that a typical number of days “lost” is … wait! This is DIY climate science! You’re going to have to figure it out for yourself by following these directions:

Open up a google search and type in the words “climate data”. Run the search, then click “Graphs”. Google will automatically look up the typical high and low daily temperature at your location month by month. Here is what it looks like for Columbus, Ohio:

This function is set up in a code and there is a for loop there that counts how many days per year that T(t) < 32.0 F. The default values for T-hottest and T-coldest in that program are for Columbus, Ohio but you can modify those numbers for your location.

The code is set up to add an overall shift in temperature and to count how many days of freezing weather that have disappeared. You can even add a random function to represent day-to-day fluctuations in the temperature and still see the trend (I sometimes advertise this activity as being an introduction to the field of data analytics with this step in mind). To get a rough idea of how many days we’re talking about, pay close attention to when the shift is equal to 1.5 F. Some locations may have warmed more than this, some less. Columbus turns out to have a temperature shift close to 2.3 F which, according to the program, indicates that Columbus has lost something like 26 days of freezing whether. This result agrees well with a data sheet on Columbus compiled by real climate scientists at GLISA which includes an estimate of the impact on the growing season. You can find GLISA data for cities in the Great Lakes region on their website. This data set is particularly useful for its estimate of how much the temperature has increased at your location. If you don’t live near within a few hours drive of the great lakes, a useful site is a New York Times database of how hot American cities were in 2017.

26 fewer days of freezing weather?! No wonder there is so little pond skating any more in Ohio! Now there is a midwestern context for understanding how, in other places, the tundra is melting and glaciers are retreating. The human impact on the climate is enough to throw nature off by weeks, not days.

This kind of computational activity can provide an admittedly simple numerical proxy for understanding the complex and interconnected feedback systems at work in climate change. There are so many different aspects of our weather that climate change impacts, that the somewhat innocuous local change of removing pond skating as a viable sport in Columbus, Ohio feels almost beneath mentioning when only 30 days ago states like Nebraska, Missouri and Iowa experienced historic flooding and there are island nations that will be under water within our lifetimes.

But for the sake of all the midwestern kids out there struggling to wrap their minds around how climate change affects them, I feel like explaining climate change this way is a gentle introduction to a topic that often seems very distant and academic. The Earth Day coding activity described here also aligns well with a rather challenging section of the Next Generation Science Standards that implores teachers to help students create computer simulations to model the impact of human activity on the environment.

For more DIY science and coding fun, subscribe to the STEMcoding youtube channel (http://youtube.com/c/STEMcoding ) and/or follow us on twitter (@STEMcoding). We use the p5.js (http://p5js.org) framework developed by the Processing Foundation.

Chris Orban is a physics professor at Ohio State University and he leads the STEMcoding project, which is an effort to integrate coding into high school physics, physical science and math. His background is in computational physics and plasma physics.

Written by