This is the repository of the paper "Fast, scale-adaptive and uncertainty-aware downscaling of Earth system model fields with generative machine learning".
Set paths to training data and hyperparameters in src/configuration.py. Some can be changed via the shell when executing the training run with:
python main.py \
--name "my_model" \
--n_epochs 50 \
--batch_size 8 The ERA5 training data can be downloaded here. The data is in hourly resolution and needs to be downloaded in individual files.
For merging the files and computing the daily mean, I recommend using the Climate Data Operators. The files can then be merged using
cdo mergetime era5_hourly_* era5_hourly_merged.ncThe daily mean can be computed using
cdo daymean -shifttime,-1hour era5_hourly_merged.nc era5_daily_merged.nc
In order to regrid the ERA5 data from the native resolution to the target resolution used in the paper use the regridding function implemented here.
Other preprocessing steps such as transformations for standardization are implemeneted in the dataloader.
Run unit tests with
python -m unittest discover tests/The implementation is mostly based on the repositories:
as well as the papers:
- Y. Song et at., 2021: https://arxiv.org/abs/2011.13456
- Y. Song et at., 2023: https://arxiv.org/abs/2303.01469
- Bischoff and Deck, 2023: https://arxiv.org/abs/2305.01822
- T. Karras et al., 2022: https://arxiv.org/abs/2206.00364
