Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions era5epw/cds.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,18 @@ def make_cds_request(
main_request = {
"dataset": ds,
"product_type": "reanalysis",
"format": "netcdf",
"data_format": "netcdf",
"variable": variables,
"year": [str(year)],
"month": [f"{month:02d}"],
"day": make_cds_days_list(year, month),
"time": [f"{i:02d}:00" for i in range(24)],
"area": [latitude, longitude, latitude, longitude],
# North, West, South, East corner points of the area to extract.
# Since 25th Feb 2026, point extraction isn't supported anymore on this dataset, we need to specify an area.
# See:
# https://forum.ecmwf.int/t/software-upgrade-for-data-extraction-of-a-geographical-area-from-selected-era5-and-seasonal-forecast-datasets/14583
# https://confluence.ecmwf.int/display/CKB/Software+upgrade+for+geographical+area+extraction+from+data+on+regular+lat-lon+grids
"area": [latitude + 0.1, longitude - 0.1, latitude - 0.1, longitude + 0.1],
}

# extend the request to cover time zone shifts
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "era5epw"
version = "0.3.0"
version = "0.4.0"
description = "A tool to convert ERA5/ECMWF data to EnergyPlus Weather (EPW) format"
authors = ["Antoine Galataud <antoine@foobot.io>"]
packages = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cds.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_make_cds_request_era5_single_levels(self):
self.assertEqual(main_request["year"], ["2021"])
self.assertEqual(main_request["month"], ["01"])
self.assertEqual(main_request["day"], [f"{d:02d}" for d in list(range(1, 32))])
self.assertEqual(main_request["area"], [50.0, 10.0, 50.0, 10.0])
self.assertEqual(main_request["area"], [50.1, 9.9, 49.9, 10.1])

def test_make_cds_request_era5_single_levels_current_month(self):
now = now_utc()
Expand Down