- 积分
- 242
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2019-5-11
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2021-3-1 19:21:45
|
显示全部楼层
本帖最后由 xfz147256 于 2021-3-1 19:24 编辑
你的链接我没有打开,之前我有尝试过的代码是这样的你可以参考一下,需要修改的部分很少,也容易看懂(前提是把cdsapi安装好):
import cdsapi
c = cdsapi.Client()
c.retrieve(
'reanalysis-era5-single-levels',
{
'product_type': 'reanalysis',
'format': 'netcdf',
'grid': '0.5/0.5',
'variable': 'sea_surface_temperature',
'year': '1979',
'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', '06:00', '12:00',
'18:00',
],
},
r'D:\Thesis\ERA5\sst_4times_per_day.1979.nc')
下面这个是向欧洲中心发送请求下载资料的代码:
# !/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
server.retrieve({
"class": "ei",
"dataset": "interim",
"date": "1979-06-01/to/1979-06-30",
"expver": "1",
"grid": "0.75/0.75",
"format":"netcdf",
"levtype": "sfc",
"param": "34.128",
"step": "0",
"stream": "oper",
"time": "00:00:00/06:00:00/12:00:00/18:00:00",
"type": "an",
"target": r"D:\Thesis\data\try.nc",
})
|
|