Tip

  1. Need help? Please let us know in the UMEP Community.

  2. Find an issue within this page? Please report it in the GitHub issues.

  3. A good understanding of SUEWS is a prerequisite to the proper use of SuPy.

supy.util.download_era5ΒΆ

supy.util.download_era5(lat_x: float, lon_x: float, start: str, end: str, dir_save=PosixPath('.'), grid=None, scale=0, logging_level=20)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.

  • logging_level (logging level) – one of these values [50 (CRITICAL), 40 (ERROR), 30 (WARNING), 20 (INFO), 10 (DEBUG)]. A lower value informs SuPy for more verbose logging info.

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