robbiewatt1 / ClimateDiffuse

Diffusion for climate downscaling
32 stars 7 forks source link

No download for 'ERA5_const_sfc_variables' included #1

Open Declan-Curran1 opened 3 months ago

Declan-Curran1 commented 3 months ago

Hi Laura/Robbie, thanks for providing the accompanying code to this paper.

I have downloaded the data per the instructions in the readme which comes to files samples_{year}.nc for each year.

However, when I go to run TrainUnet.py or TrainDiffusion.py - I run into the same error:

  File "src\\netCDF4\\_netCDF4.pyx", line 2469, in netCDF4._netCDF4.Dataset.__init__
  File "src\\netCDF4\\_netCDF4.pyx", line 2028, in netCDF4._netCDF4._ensure_nc_success
FileNotFoundError: [Errno 2] No such file or directory: 
"\\download_ERA5\\data\\ERA5_const_sfc_variables.nc"

It appears that the 'UpscaleDataset()' class in DatasetUS.py requires another .nc file 'ERA5_const_sfc_variables.nc' that isn't downloaded through the download script and is separate to the yearly data?

LevanBokeria commented 3 months ago

Hello,

I was also interested in following up on @Declan-Curran1's comment. Is there any chance to get the constant variables file or a script to download it?

We would like to use this repository as a demo for applying diffusion models to weather data for our reading group at the Alan Turing Institute.

Thank you very much!

lm2612 commented 3 months ago

Thanks for finding this and sorry. I manually downloaded that file from the ERA5 Copernicus Store. I am currently away but at some point write a script to download it. For now I've added that file to the directory data/. You could also pull it from Copernicus here: https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?tab=form (select Other, then select geopotential and land-sea mask, and any date/time and request it as netcdf).

LevanBokeria commented 3 months ago

Thank you!