Tip
- Need help? Please let us know in the UMEP Community.
- Find an issue within this page? Please report it in the GitHub issues.
- 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: Note
This function uses CDS API to download ERA5 data; follow this for configuration first: https://cds.climate.copernicus.eu/api-how-to