- 积分
- 6385
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-5-23
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
选择数据后使用的官网提供的脚本,url和key也是复制的没有改过,但是一直报错requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.e ... -era5-single-levels
我的脚本如下:
import cdsapi
client = cdsapi.Client()
dataset = "reanalysis-era5-single-levels"
request = {
"product_type": ["reanalysis"],
"variable": [
"10m_u_component_of_wind",
"10m_v_component_of_wind",
"2m_temperature",
"surface_pressure"
],
"year": ["2024"],
"month": [
"01", "02", "03",
"04", "05", "06",
"07", "08", "09",
"10", "11", "12"
],
"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"
],
"data_format": "netcdf",
"download_format": "unarchived",
"area": [-65, 60, -75, 80]
}
client = cdsapi.Client()
client.retrieve(dataset, request).download()
key和url也是直接复制的
url: https://cds.climate.copernicus.eu/api
key: xxxxx
报错是:
D:\anaconda\envs\test\python.exe D:\AAA工作\新建文件夹\data\downloaddata.py
2025-05-08 16:17:06,188 INFO Sending request to https://cds.climate.copernicus.e ... -era5-single-levels
Traceback (most recent call last):
File "D:\anaconda\envs\test\lib\site-packages\cdsapi\api.py", line 459, in _api
result.raise_for_status()
File "D:\anaconda\envs\test\lib\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.e ... -era5-single-levels
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\AAA工作\新建文件夹\data\downloaddata.py", line 50, in <module>
client.retrieve(dataset, request).download()
File "D:\anaconda\envs\test\lib\site-packages\cdsapi\api.py", line 381, in retrieve
result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
File "D:\anaconda\envs\test\lib\site-packages\cdsapi\api.py", line 481, in _api
raise Exception(error)
Exception: Not Found
进程已结束,退出代码1
请问各位大神要怎么解决啊TAT
|
|