爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6605|回复: 0

[作图] 用python下载再分析资料出错

[复制链接]

新浪微博达人勋

发表于 2020-2-28 17:21:53 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
#!/usr/bin/env python

from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
server.retrieve({
    'class': 'ei',
    'dataset' : 'interim',
    'date'    : '19880101/19880201/19880301/19880401/19880501/19880601/19880701/19880801/19880901/19881001/19881101/19881201/19910101/19910201/19910301/19910401/19910501/19910601/19910701/19910801/19910901/19911001/19911101/19911201/19930101/19930201/19930301/19930401/19930501/19930601/19930701/19930801/19930901/19931001/19931101/19931201/19980101/19980201/19980301/19980401/19980501/19980601/19980701/19980801/19980901/19981001/19981101/19981201/20100101/20100201/20100301/20100401/20100501/20100601/20100701/20100801/20100901/20101001/20101101/20101201',
    'expver'  :'1',
    'levtype' : 'pl',
    'param'   :'60.128/129.128/130.128/131/132/133.128/135.128/138.128/155.128/157.128/203.128',
    'levelist':'200/500',
    'type'    : 'an',
    'stream'  : 'moda',
    'format'  :'netcdf',
    'area'    : '90/0/0/180',
    'grid'    : '1/1',
    'target'  : 'C:/Users/LENOVO/Desktop/wenxian/data/year5strong.nc',

    })
上面是我的程序,我是按着经验贴下载的。
错误:
运行了一段时间出的error,我实在找不到什么地方出错了,因为API啥的也没问题
Traceback (most recent call last):
  File "C:\Users\LENOVO\Downloads\ecmwf-api-client-python\moonsoon01.py", line 18, in <module>
    'target'  : 'C:/Users/LENOVO/Desktop/wenxian/data/year5strong.nc',
  File "C:\Users\LENOVO\Downloads\ecmwf-api-client-python\ecmwfapi\api.py", line 520, in retrieve
    c.execute(req, target)
  File "C:\Users\LENOVO\Downloads\ecmwf-api-client-python\ecmwfapi\api.py", line 480, in execute
    size = self._transfer(urljoin(self.url, result["href"]), target, result["size"])
  File "C:\Users\LENOVO\Downloads\ecmwf-api-client-python\ecmwfapi\api.py", line 140, in wrapped
    return func(self, *args, **kwargs)
  File "C:\Users\LENOVO\Downloads\ecmwf-api-client-python\ecmwfapi\api.py", line 434, in _transfer
    chunk = http.read(1048576) # 1MB chunks
  File "C:\Python27\lib\socket.py", line 380, in read
    data = self._sock.recv(left)
  File "C:\Python27\lib\httplib.py", line 567, in read
    s = self.fp.read(amt)
  File "C:\Python27\lib\socket.py", line 380, in read
    data = self._sock.recv(left)
  File "C:\Python27\lib\ssl.py", line 241, in recv
    return self.read(buflen)
  File "C:\Python27\lib\ssl.py", line 160, in read
    return self._sslobj.read(len)
error: [Errno 10054]

以上是错误显示。
希望大家能帮我看看,谢谢!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!






密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表