Note

Please report issues with this page on the GitHub page.

supy.util.download_era5

supy.util.download_era5(lat_x: float, lon_x: float, start: str, end: str, dir_save=PosixPath('.'), grid=[0.125, 0.125], scale=0) → dict[source]

Generate ERA-5 cdsapi-based requests and download data for area of interests.

Parameters:
  • lat_x (float) – Latitude of centre at the area of interest.
  • lon_x (float) – Longitude of centre at the area of interest.
  • start (str) – Any datetime-like string that can be parsed by pandas.daterange().
  • end (str) – Any datetime-like string that can be parsed by pandas.daterange().
  • grid (list, optional) – grid size used in CDS request API, by default [0.125, 0.125].
  • scale (int, optional) – scaling factor that determines the area of interest (i.e., area=grid[0]*scale), by default 0.
  • dir_save (Path or path-like string) – path to directory for saving downloaded ERA5 netCDF files.
Returns:

key: name of downloaded file. value: CDS API request used for downloading the file named by the corresponding key.

Return type:

dict

Note

This function uses CDS API to download ERA5 data; follow this for configuration first: https://cds.climate.copernicus.eu/api-how-to