Over the past 50 years, extreme weather events have been estimated to cause 2 million deaths and cause around 4 trillion USD in property damage. Being able to predict when and where these events will occur is a significant challenge, especially in developing countries that don’t have warning systems in place. 90% of the deaths and property damage in the metrics above were in developing countries. Since the 1950’s, most weather predictions have been made using expensive numerical models on supercomputers using large amounts of data. This abundance of collected data is also great for training powerful machine learning models and a more accessible alternative to the numerical models.
In this project, I took inspiration from this paper and applied their ConvLSTM to data collected from the era5 hourly dataset. I also experimented with combining the GRU and ConvLSTM architectures to improve performance and new loss functions to improve accurucy.
The full article going in-depth on the experiments I ran are coming soon
git clone https://github.com/ConnorFair36/Tomato-Leaf-Disease-Prediction
cd Tomato-Leaf-Disease-PredictionThis example uses uv, but any Python environment manager will work.
uv init
uv add -r requirements.txtThe dataset is downloaded from the Climate Store API and is automaticly stored as a .grib file before being converted into a .zarr file for easier access. This requires the eccodes package to be installed. You can find more system-specific information here
cd data
uv run download_dataset.py
cd ..
To train a model, go to the config.yaml file and set MODE: "training". This will create a new folder in src/weights that will store the model weights, optimizer state, training and validation curve plot and csv. To run you training parameters run:
uv run main.py configs/config.yaml
To test a model, go to the config.yaml file and set MODE: "inference". This will print out the overall metrics and the metrics for each timestep. To run:
uv run main.py configs/config.yaml
A case study of spatiotemporal forecasting techniques for weather forecasting
Convolutional LSTM Network: A Machine Learning Approach for Precipitation Nowcasting