标签:second public seconds etc asp set splay cti view
步骤:
1.python
2.ECWMF账号和密码:编写.ecmwfapirc文件,放置在C:\Users\用户名 目录下,内容:
{
"url" : "http...",
"key" : "key",
"email" : "email address"
}
https://confluence.ecmwf.int/display/WEBAPI/Access+ECMWF+Public+Datasets/网页可以找到以上内容
3.下载
进入下载网址https://apps.ecmwf.int/datasets/data/interim-full-daily/levtype=sfc/
选择想要的数据,view data retrieval request 可以得到python脚本
复制该脚本到.py文件,修改data、grid、area、target、增加:"format":"netcdf"
编写循环语句
day_month_dic = {1:31,2:28,3:31, 4:30, 5:31, 6:30, 7:31, 8:31, 9:30, 10:31, 11:30,12:31}
year = 2006
for month in range(1,12):
data_varied = "{}-{:0>2d}-01/to/{}-{:0>2d}-{}".format(year, month, year, month, day_month_dic[month])日期显示为“year-month-date/to/year-month-date”(需勘误)
复制的脚本内容
脚本中"target": "F:\erai\{0}\{1}_{2:0>2d}.nc".format(year,year,month)
4. py .py文件
5. 遇到的问题:① 显示ecmwfapi模块未安装,从cmd进去之后ok了
② 显示error contacting the WebAPI,retrying in 60 seconds
解决方法:https://www.quovadisglobal.com/QVRepository/DownloadRootsAndCRL.aspx下载CA2 G3并安装
打开mmc.exe,选择证书,添加当前用户更新导入所有证书
标签:second public seconds etc asp set splay cti view
原文地址:https://www.cnblogs.com/bea-an/p/12025046.html