RHEA: I’ve been balancing my interests in computer programming and atmospheric science since college, when I took courses in both areas. Climate modeling is a wonderful blend of the two, and a draw for me on many levels, particularly in its potential to help our society anticipate changes to the environment we live in, and even motivate solutions to prevent the worst consequences of the anticipated change. I enjoy writing software that has a tangible purpose – climate modeling fits the bill well.
JEREMY: How hard it is to read and edit climate model code is an inside joke of the climate community. As a student researcher, it took me over a month just to figure out how to run one. This is honestly a big problem in climate science. A lot of interesting science questions don’t get asked because scientists have a very hard time editing or even reading what a model’s code is doing. The scientists who wrote these models were mostly concerned with getting an answer to a science question or making the code run fast, rather than readability. Often this code has no documentation. So when other scientists do need to edit models, it is a big undertaking. And because of how funding incentives and programming training in science (or lack thereof) are set up, it’s a problem that’s really hard to address.
I fell in love with programming when I took first-year computer science classes as a physics student at the University of Toronto. Code and documentation can read like a story and tell you how a system works. Climate change is far too important of an issue to have as big a barrier as we do to understanding and improving climate models. Especially in the age of machine learning, where there are thousands of people outside of the climate community who could really improve our predictions. What drew me to climate modeling was the possibility of making it easier for everyone to make an impact on such an important issue.
RHEA: Climate models tell us very clearly our planet is getting warmer, but in order to get more information about how much it will warm where and when, how much it will rain, and how other weather events change in different regions, we need to be able to run models faster and at a higher resolution. Current climate models were designed to be very fast on a specific type of computer, but aren’t set up to take advantage of new hardware advances. We are rewriting a climate model in a way that can continue to run fast on the machines it was designed for, and run much faster on the newest machines.
JEREMY: We’re taking a tried and true model and bringing it into the modern era. New supercomputers use graphics cards to get faster and more accurate results, but climate models aren’t written to run on them. We’re re-writing the climate model in a way that runs both on graphics cards and on traditional processors, while also making it much more accessible to read, understand, and edit the model’s code.
RHEA: We also want to separate the code that specifies the equations to be computed from the code that ensures those calculations are done efficiently, so this new model could be more easily adapted to run well on the next generation of machines. We want to cause a drastic shift in how much climate models can tell us, and enable people running climate simulations to learn this information more quickly at a lower cost.
JEREMY: I work with both the “faster” and “better” sides of the project, writing new model code to run faster and writing machine learning code to make climate model predictions more accurate. Because of this, I like to focus on the parts of the code a new scientist is most likely to look at if they try to use or make small changes to our model. These are the parts that we care about the most when trying to improve the model predictions by adding machine learning.
RHEA: I am on the DSL team – we are directly focused on making climate models faster. However, they’re very interrelated, as once models are speedier, they can run at higher resolutions, so that also provides more accurate results.
Two of the reasons climate models are hard to use are because they’re hard to run on your own computers, and they’re (usually) written in Fortran, a programming language which came out in 1957 and today is rarely used outside of large supercomputing centers. We wrapped the climate model in Python so we can use it with machine learning libraries and with our new Python model code.
This makes it much easier for us to edit the model code, see what’s happening in the model while it’s running, and use the model with Python libraries. We also used Docker, a platform which bundles code with the dependencies it needs to run, so we can run the model on our laptops and in the cloud. The examples are geared towards scientists but are something you can run on any computer or laptop. If you’re interested, you can find the paper here and the code for the examples in the paper here.
I shared the significant improvements we’d made in model performance by enhancing our compiler tools and how the new model uses them. Since that presentation, we’ve continued to make good progress – we can now run the central component of the model using Python faster than the original Fortran code. In other words, our new model has now caught up to and surpassed existing models for speed.
I also highlighted some of the patterns in the model that were particularly interesting and challenging to solve. I shared our approach to writing the model in a different language and verifying it produces the same results as the old model, as well as how easy it is to run on multiple hardware architectures.
JEREMY: The straightforward impact or goal for our project is that by making this climate model run faster, more science can be done at higher, more accurate resolutions. I am also hopeful that by making a climate model that is easier to read, run, and edit, we will enable science that would otherwise be impossible. I want a machine learning scientist with no climate training to be able to read our code and our documentation and learn how climate works, the same way I can read the documentation for a machine learning library and learn how ML models work. I’d like a scientist to look at a question where they’d currently say, “that sounds too hard” and instead say “yeah, I can do that”. The more people we can get involved and the more science we can get done, the better prepared we will be for what’s in store.
RHEA: If we’re successful, it will be possible to run a climate model on the fastest supercomputers at higher resolutions. This will provide a wealth of more accurate climate predictions with lowered uncertainty. We hope this work inspires other modeling groups to take the same technology approach, so that many models can run at the same scales and inform policy decisions. The information fast climate models provide will empower local governments all over the world to plan for the likely impact of a changing climate to their region. Additionally, scientists studying the climate should be able iterate more quickly with much friendlier code and bring modeling improvements at a rapid pace.
RHEA: The rapid pace at which we sped up the model we wrote has instilled a lot of hope that it is possible for a large step change in predicting climate change to occur in the near future. The positive feedback we receive from the climate modeling community, and the support we’ve received from several organizations both encourages my team and indicates how much climate modeling is being prioritized. I expect big things to come out of the many quality efforts spinning up around understanding and adapting to climate change.
JEREMY: Seeing how much of a drive there is in the machine learning community to make a positive impact in climate change. Full rooms at workshops run by groups like Climate Change AI. We’re going to need all the help we can get.