I am trying to download some data using new API, I am just using API request off of Climate Data Store. I am getting following error.
2024-10-04 15:13:06,785 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels
Traceback (most recent call last):
File "/glade/u/apps/opt/conda/envs/npl/lib/python3.11/site-packages/cdsapi/api.py", line 442, in _api
result.raise_for_status()
File "/glade/u/apps/opt/conda/envs/npl/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-pressure-levels
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/glade/derecho/scratch/inj/e5.vort/e5.vort.dl.north.py", line 52, in <module>
client.retrieve(dataset, request, target)
File "/glade/u/apps/opt/conda/envs/npl/lib/python3.11/site-packages/cdsapi/api.py", line 364, in retrieve
result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/glade/u/apps/opt/conda/envs/npl/lib/python3.11/site-packages/cdsapi/api.py", line 464, in _api
raise Exception(error)
Exception: Not Found
Looks like it is complaining about bad link. Here is the API script I am using.
import cdsapi
dataset = "reanalysis-era5-pressure-levels"
request = {
"product_type": ["reanalysis"],
"variable": ["vorticity"],
"year": ["1940"],
"month": ["05"],
"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"
],
"time": [
"00:00", "01:00", "02:00",
"03:00", "04:00", "05:00",
"06:00", "07:00", "08:00",
"09:00", "10:00", "11:00",
"12:00", "13:00", "14:00",
"15:00", "16:00", "17:00",
"18:00", "19:00", "20:00",
"21:00", "22:00", "23:00"
],
"pressure_level": ["300", "500"],
"data_format": "netcdf",
"download_format": "unarchived",
"area": [56, -140, 46, -60]
}
client = cdsapi.Client()
client.retrieve(dataset, request).download()
Any ideas…?