Training in Python is fundamental for emerging African climate researchers

Sessions during the two-day python workshop


Sessions during the two-day python workshop


A key output of Future Climate for Africa (FCFA) projects has been focusing on capacity development of Early Career Researchers (ECRs) through consortium, cross-consortia and external initiatives. It is hoped that through these initiatives ECRs will have increased knowledge, capacity and skills to enhance their development and/or use of climate information.

An essential skill of climate modelling is the ability to apply and understand coding language such as Python. Going forward with the ethos of collaboration and peer-to-peer learning that is central to the FCFA program, a Python training workshop was arranged for ECRs in Uganda by a UK ECR from HyCRISTAL (Dr Declan Finney, University of Leeds). This capacity development initiative illustrated the powerful partnerships between British climate scientists and emerging African climate scientists.

Declan shared programming knowledge and skills with Africa based ECRs, students from Makerere University and one staff member from the Uganda National Meteorological Authority (UNMA) in Uganda, East Africa.

The workshop activities revolved around introducing Python and bash terminal, interspersed with activities related to reading NetCDFs, analysing the data, plotting, and suggestions of Python-based activities. Attendees had the freedom to explore their own interests and many started working on their own data, asking questions from those at the workshop with more Python experience. Occasional interruptions were made to present solutions that were more widely relevant – notably, it was clear that many used data in tabular (csv) form, and therefore the Python pandas package was introduced (something initially left out).

The workshop did not go ahead without challenges including a student strike at Makerere University which resulted in last-minute changes hold the workshop in a hotel.

Additionally, a struggling internet connection which resulted in delays in installation of Python packages. This problem is likely to occur in many parts of Africa, and therefore advice for future Python workshops is to ensure necessary software of consistent versions is correctly installed before the workshop.

None of the challenges ruined the workshop, and in many cases working through the problems provided a useful troubleshooting demonstration. Designing a flexible schedule was essential to allow time for this. Some attendees ended up working together on their laptops with successful installations. This appeared to be a positive side-effect that encouraged attendees to overcome challenges together.

Despite the challenges, participants were highly motivated, quick to learn and eager to instantly share knowledge as they acquired it in the workshop to help fix some problems others were having. To continue the sharing of Python knowledge, a google groups mailing list was created for attendees to work together after the workshop. To-date, this has had some modest success as a platform to share and offer solutions.

Results from surveys after the workshop were very positive. Notably, all attendees felt they had made progress in learning Python, with approximately 70% saying such a course is a high priority for African students and ECRs in climate science. Six months after the workshop, an additional survey was conducted and over 60% of ECRs indicated that they were still using or planning to use Python.

Many of the suggestions made by the attendees encouraged having longer and additional workshops, with some pointing toward supporting African institutions to run similar workshops. Some suggestions on programming that could have been included were: wind vectors, Taylor diagram plots, intraseasonal rainfall characteristics and connections between Python and other programming languages like R.

Before the workshop, I knew nothing about Python… Now I know about it and I hope to continue learning and using it. I suggest that workshops to be added more time and to be carried out often in institutions”, stated one of the ECRs.

Follow up support has remotely been provided to the three ECRs from Makerere University undertaking analysis of climate model data from JASMIN platform and this has proven to work in building programming and data analysis skills for Africa based researchers.

This initiative has benefited longer-term capacity building in East Africa through the inclusion of university students, as well as supporting HyCRISTAL ECRs in their current and upcoming work. It has provided the basic skills for ECRs to explore the new CP4 Africa dataset developed by the IMPALA project. Therefore, opening up possibilities of continuing the research already undertaken as part of FCFA projects is essential. An example is the East meets West (HyCRISTAL gap-filling project), in which Herbert Misiani of IGAD Climate Prediction and Applications Centre has developed his Python skills independent of the workshop in order to analyse the CP4 Africa data.

This article was written by Declan Finney, Jesse Kisembe, Geoffrey Sabiiti, and Rhoda Nakabugo who are part of the  Integrating Hydro-Climate Science into Policy Decisions for Climate-Resilient Infrastructure and Livelihoods in East Africa (HyCRISTAL) research consortium. HyCRISTAL aims to develop a new understanding of climate change in East Africa and to work with the region’s decision-makers to manage water resources for a more climate-resilient region in future.