This is the code repository for article Accurate Medium-to-Long-Term Weather Forecasting in Latent Space.
The Earth Grid dataset is from WeatherBench 2, which can be downloaded via Google Cloud.
After downloading, you can use dataset_process/earth_grid_1.py
and dataset_process/earth_grid_2.py
to convert these raw data to pytorch tensor format and then normalize them, so that the model can use these processed data for training and testing.
Run earth_grid_ae/main.py
to train the Spatial-Encoder and Spatial-Decoder, then run earth_grid_f/main.py
to train the Temporal-Predictor.
The Earth Station dataset uses pre-processed data provided by Corrformer. Here we directly provide the pytorch tensor data in dataset/earth_station/tensor
directory since the file size is not too large.
Run earth_station_ae/main.py
to train the Spatial-Encoder and Spatial-Decoder, then run earth_station_f/main.py
to train the Temporal-Predictor.
The Mars Grid dataset is from OpenMARS.
After downloading, put all .nc
files that start with openmars_
(i.e. all .nc
files except MCS_ret_coverage.nc
) to dataset/mars_grid/raw
folder. Then use dataset_process/mars_grid_1.py
and dataset_process/mars_grid_2.py
to do format conversion and normalization.
Run mars_grid_ae/main.py
to train the Spatial-Encoder and Spatial-Decoder, then run mars_grid_f/main.py
to train the Temporal-Predictor.