Hackathon improves sub-seasonal forecasting, vital to livelihoods in East Africa

By Lauren Phillips, University of Leeds

Scientists from Kenya and the UK joined forces for an intensive week of programming to improve sub-seasonal forecasting in East Africa.

Hosted in February 2020 by the GCRF African Science for Weather Information and Forecasting Techniques (SWIFT) and ForPAc research programmes, the East Africa Hackathon brought forecasters and researchers together to share technical coding expertise in Python, a common programming language used by climate scientists around the world. 

East Africa Hackathon participants prepare for an intensive week of programming and problem solving in Reading, UK.

Participants included African SWIFT and ForPAc scientists from the Kenya Meteorological Department (KMD), the IGAD Climate Predictions & Applications Centre (ICPAC), the University of Reading, and the UK Centre for Ecology & Hydrology.

“The hackathon offered an uninterrupted week to share code, product development insights, and trouble-shooting methods. Hands-on experiences like this can resolve technical issues, but more importantly, they’re key to developing better code and to understanding the root causes of common coding issues,” says Dr Elisabeth Thompson, postdoctoral research scientist in the GCRF African SWIFT programme and hackathon participant.

Sub-seasonal forecast products inform decision-making

Forecasters and researchers from the GCRF-African SWIFT and ForPAc programmes collaborate to improve coding skills in Python.

According to Thompson, the hackathon helped build on critical skills for  participants of African SWIFT Testbed 2, a two-year initiative where national meteorological services, universities and forecast users in Africa are working together to create more useful forecasts on sub-seasonal timescales – one to four weeks into the future.

Masilin Gudoshava (left), Mary Kilavi and Elisabeth Thompson enjoy a break from coding.

“In the testbed, forecasters, scientists and users collaborate to create forecast products together. The users – an energy company, agricultural agencies, and health organisations – provide regular feedback on the forecast products they need to inform decisions,” Thompson explains.

“We then use Python to turn raw forecast data into information that non-experts can easily understand – these are the forecast products that guide decision-making.

“By developing our programming skills through events like the hackathon, scientists are able to produce new products and tailor existing ones to better suit the users’ needs.”

With the huge amount of forecast data available, honing in on relevant information and clearly communicating it through well-developed forecast products can significantly impact people’s livelihoods in East Africa.

For example, agricultural agencies can use sub-seasonal forecast products to support farmers with decisions on planting and harvesting, contributing to food and nutrition security. Similarly, energy companies can use the information to make informed decisions on dam water management for hydropower production.

Hackathon builds skills and capacity of forecasters

Masilin Gudoshava, African SWIFT lead research scientist from ICPAC says the hackathon was an opportunity to build critical skills in Python which is quickly becoming key for African forecasters.

“Although I had used other software for analysis, going into the hackathon I had very little expertise in Python programming. In the week I spent at Reading, I learned a lot about the syntax and key words; how to subset, reshape and create arrays; how to import the libraries to be used in the script; and how to plot from scratch. I was also shown the basic recourse list to use if I get stuck when developing a script and learned how to navigate through the JASMIN supercomputer,” she says.

“These resources are important in my role at ICPAC, especially when producing weekly forecasts. In addition to developing Python scripts from scratch, I am able to better tailor forecast products to suit our users’ expectations which helps them easily understand the climate forecast information.”

Following the success of the East Africa Hackathon, African SWIFT intends to host a similar event for scientists based in the programme’s other focal countries – Senegal, Ghana and Nigeria. Until then, the University of Reading team is continuing to host mini online hackathons to continue collaborating and building programming skills.