- 积分
- 6155
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-9-11
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 小莹子 于 2019-11-13 09:54 编辑
CentOS7批量下载ERA5数据
参考 博主 alonso_ecit https://blog.csdn.net/u014269043/article/details/90289964
1.注册cds账号:https://cds.climate.copernicus.eu/
注册完毕后会生成UID和API Key
(注:打开注册邮箱,After setting your password,you will be able to log in at下面的链接,然后打开就可以看见API key 和UID)
2.创建.cdsapirc
https://cds.climate.copernicus.eu/api-how-to
在/home路径下创建
vi .cdsapirc
写入:
url: https://cds.climate.copernicus.eu/api/v2
key: uid:api key (第一步的UID和KEY)
verify: 0 (同意下载协议)
保存后,复制到/root路径下,即cp .cdsapirc /root
3.选择下载参数
网址:https://cds.climate.copernicus.e ... thly-means?tab=form
点击show API request
出现相关命令行代码
复制到新建的*.py文件中,并在首行添加 #!/usr/bin/env python
如:
#!/usr/bin/env python
import cdsapi
c = cdsapi.Client()
c.retrieve(
'reanalysis-era5-single-levels-monthly-means',
{
'product_type':'monthly_averaged_reanalysis',
'variable':'2m_temperature',
'year':[
'1979','1980'
],
'month':[
'01','02','03',
'04','05','06',
'07','08','09',
'10','11','12'
],
'time':'00:00',
'format':'netcdf'
},
'/home/syrus/下载/download.nc')
4.运行
cd /usr/bin
env python
复制代码并运行
|
-
|