Logo Lanfrica

krishnaongith2025/ai-weather-extremes-africa

Domain:

climate

Record type:

project
Creator:
kri
Host:
# AI models weather forecast This repository contains the scripts for a project evaluating the performance of AI models weather forecast over Africa. It is developed as part of the 'Scientific Writing' course at University of Leipzig. ## Repository structure ``` scripts/ data access + calculate the records margin visualisation/ notebooks that generate plots data/ all .nc datasets figures/ analysis and maps/ resources/ reference paper ``` ## Data The datasets used in this project are public and can be accessed through `gs://weatherbench2/datasets`, check the weather bench 2 website guide ## Scripts ### `scripts/compute_records.py` Access the ERA 5 dataset and extracts the 2m_temperature and 10m_wind_speed from 1979 to 2017. The data is downloaded in one file per year grouped by month (~39 files) input: dataset through weatherbench2 output: data/records_yearly/records_YYYY.nc (~39 files) ### `scripts/create_record_by_year.ipynb` Aggregates all yearly files into a single file, taking the max/min across all years for each month, plus the year in which that record occurred. Dimensions: month 1-12, lat, lon Data variables: temp_max, temp_min, w_speed_max, w_speed_min, temp_max_year, temp_min_year, w_speed_max_year, w_speed_min_year input: data/records_yearly/records_YYYY.nc output: data/records.nc ### `scripts/record_union_detection.py` and `scripts/detect_records_casts.py` In this script the weather model forecasts are read. The ERA 2020 values are used as ground truth, the models forecasts are checked using this values. Calculate the margin of the model against the historical record; the record values are saved. 1. The data preparation includes: read `records.nc` and masks the region of Africa (with >50% land). 2. Calculate the true values, based on the pixels that broke record using ERA 2020 and the historical values. Record values are saved as `ground_truth_africa_2020.nc` 3. Access Pangu and GraphCast forecast for the y …

Languages