A CNN is trained to predict whether or not precipitation will exceed 10mm/24h in three regions of Switzerland based on simulations of the numerical weather prediction model COSMO-E.
Contains all Scripts relevant for data preparation.
-
chunk_conv.py Generates namelist to convert grib to netcdf files (all)
-
chunk_conv_post.py Generates namelist to convert grib to netcdf files that are listed in log.txt (generated by check_complete)
-
crop_netcdf_24hours.py Crops a 28x28 gridpoint sample centered around the centroid of a region. All timesteps from t_ini + 24 to t_ini + 47 are included (requires subtraction of the t-24h precipitation field with timesteps t >= t_ini + 25)
-
crop_netcdf_24hours_benchmark.py Crops all gridpoints inside a region. Similar to crop_netcdf_24hours.py, a subtraction of preceding precipitation fields is necessary.
-
prepare_obs.py Prepares observations.
-
prepare_for_training.py Prepares model data for training by excluding timesteps that are NULL in observations. (follow-up to crop_netcdf_24hours.py)
-
prepare_benchmark.py Prepares benchmark (Follow-up to crop_netcdf_24hours_benchmark.py)
-
list_directories.py Creates a list of all runs (arranged in individual directories) available for training
-
Testsplitter.py splits available runs into test and training set & outputs a list available for training (training_set.txt)
-
copy_training_set.py Copies all files listed in training_set.txt to a folder Training_set in home directory
-
*.sh Scripts to send batch jobs
-
check_*.py Scripts to check completeness of data prepared in the above scripts.
-
get_coordinates_netcdf.py Get coordinates of COSMO-E gridpoints (as generated in crop_netcdf_24hours.py) of a given region
Contains all scripts relevant for training & evaluation
-
cnn_mnist_setup.py Performs 10-fold crossvalidation by training cnn with a setup inspired by LeNet-5 to predict precipitation events. Samling is done by a random train_test_split
-
cnn_mnist_setup_stratified.py Preforms 10-fold crossvalidation by training cnn with a setup inspired by LeNet-5. Due to inbalanced data set, sampling is stratified, without omitting neighbouring model runs
-
train_cnn.py Trains cnn without crossvalidation using stratified sampling to separate training and validation set.
-
eval_models.py Calculates evaluation scores, plots confusion matrices and roc curves
-
eval_sensitivity.py Checks how sensitive selected regions are to manipulation of the input data by successively setting 7x7 areas of the input tensors to 0. Results are plotted in histograms.