A tool that fetches ERA5 data and generates a full year AMY (Actual Meteorological Year) EnergyPlus Weather file (EPW).
The tool takes care of fetching the necessary data from the Copernicus Climate Data Store (CDS) and the Copernicus Atmosphere Data Store (CAMS), processing it, and formatting it into the EPW format. It's designed for fast and efficient data retrieval.
Make sure to register for an API key and validate licences at:
- https://cds.climate.copernicus.eu/ (ERA5 data)
- https://ads.atmosphere.copernicus.eu/ (Copernicus Atmosphere Data Store)
Then create the file ~/.cdsapirc with the following content:
url: https://cds.climate.copernicus.eu/api/v2
key: <your_api_key>Note: the URL will be dynamically managed by the script depending on the data source. The API key doesn't vary, it's the same for both ERA5 and CAMS data.
Moreover, before proceeding, it is required to accept all the licenses in the section "Your profile" in the website of Copernicus.
pip install era5epwClone the current repository and install the required dependencies using Poetry:
git clone https://github.com/airboxlab/era5epw.git
poetry installExample usage:
# using poetry, execute in local repository
poetry run era5epw_download --year 2024 --latitude 49.4 --longitude 0.1 --city-name "Le Havre" --elevation 0 --time-zone 1
# using installed binary, after pypi package installation
era5epw_download --year 2024 --latitude 49.4 --longitude 0.1 --city-name "Le Havre" --elevation 0 --time-zone 1By default, the time-zone argument is used only to populate the LOCATION header and data time is UTC. Use --apply-time-zone-to-data to apply it to the date and time fields (this will shift the UTC time by the provided time zone offset).
Use --help to have a list of available options.
Datasets home pages:
- ERA5 hourly time-series data on single levels from 1940 to present (Experimental)
- ERA5 Land hourly time-series data from 1950 to present (Experimental)
- ERA5 hourly data on single levels from 1940 to present
- CAMS solar radiation time-series
View your API requests and download responses at:
Check CDS API status at CDS Live, it provides information about congestion for each dataset.