diff --git a/era5epw/cds.py b/era5epw/cds.py index 15c7bf9..7ab202b 100644 --- a/era5epw/cds.py +++ b/era5epw/cds.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 1eacdba..b2b7374 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] packages = [ diff --git a/tests/test_cds.py b/tests/test_cds.py index 7864226..4073ee3 100644 --- a/tests/test_cds.py +++ b/tests/test_cds.py @@ -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()