This repository contains code for the paper "ConvMOS: Climate Model Output Statistics with Deep Learning".
- REMO data
- This data is available here (~ 5.6 GB).
- It is already prepared for use with ConvMOS.
- GTOPO 30
- GTOPO is provided by USGS.
- Make sure you remap it to the same grid as the REMO data with
cdofor example.
- E-OBS
- Available from ECAD. We used V19.0e for our paper.
- Make sure you remap it to the same grid as the REMO data with
cdofor example.
Correct paths to the data have to be set in the config.ini.
This code is designed to work with data from REMO RCM. To this end, we have REMO variables as netcdf-files at the EUR-44 grid and GER-11 grid. We base this on data with timesteps of 6-hours, but we want daily data. These files have to be preprocessed for them to be used here. This is achieved with prepare_netcdf_files.sh.
First, I made sure that the data is available in the following structure with .nc files in the leave nodes:
EUR-44 or GER-11
{var1withdifferentpressures}
{pressure1}
{pressure2}
{var2withoutdifferentpressures}
{var3withdifferentpressures}
{pressure1}
{pressure2}
Sometimes, there are accidental a.nc files in these folders which have to be removed.
Then, I ran the script for each var-folder like, for example, so ./prepare_netcdf_files.sh EUR-44/var1withdifferentpressures -d -f EXCEPT for variable 260 (precipitation), which I preprocess with ./prepare_netcdf_files.sh EUR-44/260 -d -f -s, so that it calculates the daily sum and not the mean of the 6-hour parts.
While it most probably does nothing bad to leave it like that, I also commented out the remapbic cdo call and changed the output of the daily aggregation step to ${filename}_remap.nc for GER-11, as the original data provided is already in GER-11 grid, so no remapping is necessary. Note that I left it in once and compared the resulting files with ncdiff and the differences were all 0, so I'm pretty sure that this is not necessary, but I did it anyways.
I also used this script on the E-OBS target data. Make sure the data is on the same grid and that the variables are renamed, so that xarray can read the files.
- Baselines:
- Rename
config_baseline.initoconfig.ini - Adjust
modelto the baseline model you want to run (seebaseline.pyfor available model names) - Run
python3 baseline.py
- Rename
- ConvMOS:
- Adjust
config.inito your liking - Run
python3 run.py
- Adjust
We use the following models:
- Lin (Local Linear Regression):
- Adjust
config_template_remo_prec_baseline.iniso thataux_variablesis empty (if necessary) - Run
start_k8s_job.sh my_lin_run -m linear
- Adjust
- NL PCR (Non-local Principal Component Regression):
- Adjust
config_template_remo_prec_baseline.iniso thataux_variablescontains all variables (if necessary) - Run
start_k8s_job.sh my_nlpcr_run -m linear-nonlocal
- Adjust
- NL RF (Non-local Random Forest):
- Adjust
config_template_remo_prec_baseline.iniso thataux_variablescontains all variables (if necessary) - Run
start_k8s_job.sh my_nlrf_run -m rf-nonlocal
- Adjust
- ConvMOS:
- Adjust
config_template_remo_prec.iniso thataux_variablescontains all variables (if necessary) - Run
start_k8s_job.sh my_convmos_run -m convmos -a gggl -sggglspecifies the module composition
- Adjust