- 积分
- 4109
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-8-16
- 最后登录
- 1970-1-1
|
发表于 2020-9-1 09:12:48
|
显示全部楼层
# -*- coding: GBK -*-
import cdsapi
import calendar
c = cdsapi.Client()
for year in range(2000,2020):
for mon in range(1,13):
monthRange = calendar.monthrange(year,mon)
for day in range(1, monthRange[1]+1):
print('------------ Download %s%s%s'% ("%04d" % year,"%02d" % mon,"%02d" %day))
c.retrieve(
'reanalysis-era5-pressure-levels',
{
'product_type': 'reanalysis',
'variable': [ 'geopotential','u_component_of_wind',
'v_component_of_wind', 'vorticity',],
'pressure_level': ['700','850',],
'year':str(year),
'month':("%02d" % mon),
'day':("%02d" % day),
'time':['00:00','06:00', '12:00', '18:00',],
'area':'40/95/25/111',
'grid':'0.25/0.25',
'format': 'netcdf',
},
'd:\\era5\\CDS%s%s%s'% ("%04d" % year,"%02d" % mon,"%02d" %day)+'.nc') |
|