I wanted to download data from ERA5 CDS through API request script as below and got the following error?
import cdsapi
dataset = “derived-era5-pressure-levels-daily-statistics”
request = {
“product_type”: “reanalysis”,
“variable”: [“temperature”],
“year”: “2000”,
“month”: [
“03”, “04”, “05”,
“06”
],
“day”: [
“01”, “02”, “03”,
“04”, “05”, “06”,
“07”, “08”, “09”,
“10”, “11”, “12”,
“13”, “14”, “15”,
“16”, “17”, “18”,
“19”, “20”, “21”,
“22”, “23”, “24”,
“25”, “26”, “27”,
“28”, “29”, “30”,
“31”
],
“pressure_level”: [“850”],
“daily_statistic”: “daily_mean”,
“time_zone”: “utc+00:00”,
“frequency”: “1_hourly”
}
client = cdsapi.Client()
client.retrieve(dataset, request).download()
HTTPError Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/cdsapi/api.py in _api(self, url, request, method)
458 try:
→ 459 result.raise_for_status()
460 reply = result.json()
~/anaconda3/lib/python3.7/site-packages/requests/models.py in raise_for_status(self)
939 if http_error_msg:
→ 940 raise HTTPError(http_error_msg, response=self)
941
HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/v2/resources/derived-era5-pressure-levels-daily-statistics
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
in
30
31 client = cdsapi.Client()
—> 32 client.retrieve(dataset, request).download()
~/anaconda3/lib/python3.7/site-packages/cdsapi/api.py in retrieve(self, name, request, target)
379
380 def retrieve(self, name, request, target=None):
→ 381 result = self._api(“%s/resources/%s” % (self.url, name), request, “POST”)
382 if target is not None:
383 result.download(target)
~/anaconda3/lib/python3.7/site-packages/cdsapi/api.py in _api(self, url, request, method)
479 )
480 error = ". ".join(e)
→ 481 raise Exception(error)
482 else:
483 raise
Exception: Not Found