"Bechmark test" contains scripts used for running PySTEPS, more detail can be found at: https://github.com/RubenImhoff/Large_Sample_Nowcasting_Evaluation
"event selection and data analysis" contains scripts used for selecting extreme precipitation events and analyze the precipitation data
"vqgan+transformer" contains the main scripts for the model, which is based on another opensource project avavilable at https://github.com/lucidrains/nuwa-pytorch. The folder includs scripts of the modified model structure and the conducted experiments
The code can be used following the steps below:
- Download the precipitation data, install nuwa-pytorch and PySTEPS
- Use event selection and data analysis/event_selection_extreme_opti to calculate the catchment-averaged precipitation accumulation of all possible events
- Use event selection and data analysis/event_selection_function to find the threshold of extreme precipitation events and generate the training/validation/testing set
- Use vqgan+transformer/vqgan_training to train the VQGAN, which is the first stage of the model
- With the trained VQGAN, transform the radar data to latent space token sequences
- Use vqgan+transformer/transformer_training to train the autoregressive transformer, which is the second stage of the model
- Use vqgan+transformer/experiment_nowcasting to test the model's ability of producing nowcasting result
- Use vqgan+transformer/experiment_extreme_detection to test the model's ability of detecting the defined extreme events
The overall sturucture of the model is shown below: