爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: leeol

[其他] 利用python脚本,批量自动下载欧洲中心的气象数据

  [复制链接]

新浪微博达人勋

发表于 2015-6-6 08:35:16 | 显示全部楼层
好东西啊,学习一下,不过为什么月资料无法下载(自动回复:请不要使用迅雷等下载工具,点我查看下载帮助)?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-6-19 11:39:49 | 显示全部楼层
楼主,用python下数据的时候,数据的大小有没有限制?我下载数据到3.1g的时候就会出现错误?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-6-23 20:52:51 | 显示全部楼层
rust123 发表于 2015-6-19 11:39
楼主,用python下数据的时候,数据的大小有没有限制?我下载数据到3.1g的时候就会出现错误?

不是Python的限制,是欧洲中心的限制,好像是在2G左右
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-6-25 16:24:34 | 显示全部楼层
本帖最后由 837078493 于 2015-6-25 16:52 编辑

楼主 我下载的时候总是错误:
HTTP Error 400: BAD REQUEST
mars - WARN   - 20150625.082259 - Closing connection with 915628 bytes outstanding
mars - ERROR  - 20150625.082259 - Maximum retrieve size 10.00 G reached. Please split your request.
mars - ERROR  - 20150625.082259 - Mars server task finished in error
mars - INFO   - 20150625.082259 - 5172 fields have been interpolated
mars - INFO   - 20150625.082259 -   Post-processing: wall: 8 min 30 sec cpu: 8 min 29 sec
mars - INFO   - 20150625.082259 - Request time:  wall: 9 min 2 sec  cpu: 8 min 59 sec
mars - WARN   - 20150625.082259 - Got 725291972 out of 908718480 bytes
mars - ERROR  - 20150625.082259 - Some errors reported
mars - INFO   - 20150625.082259 -   Read from network: 691.69 Mbyte(s) in 1 sec  [590.69 Mbyte/sec]
mars - INFO   - 20150625.082259 -   Writing to target file: 10.00 Gbyte(s) in 13 sec  [776.00 Mbyte/sec] cpu: 12 sec
mars - ERROR  - 20150625.082259 - Request failed
mars - INFO   - 20150625.082259 -   Visiting marser: wall: 9 min 2 sec
mars - ERROR  - 20150625.082259 - Error code is -2
mars - ERROR  - 20150625.082259 - Double buffer error: Assertion failed: length == buffers_.length_ in run, line 297 of /users/maxtest/git/eckit/src/eckit/io/DblBuffer.cc(RemoteException from Connector[dhs1427:9701]) [marser]

Traceback (most recent call last):
  File "H:\second year\xiaxueqi\gongzuo\shuju\ecmwf-api-client-python\lupit_pl_14_20.py", line 32, in <module>
    'target'  : "H:/second year/xiaxueqi/gongzuo/shuju/ecmwfapi/pl_20080701_20080710.grib"
  File "H:\second year\xiaxueqi\gongzuo\shuju\ecmwf-api-client-python\ecmwfapi\api.py", line 414, in retrieve
    c.execute(req, target)
  File "H:\second year\xiaxueqi\gongzuo\shuju\ecmwf-api-client-python\ecmwfapi\api.py", line 366, in execute
    self.connection.wait()
  File "H:\second year\xiaxueqi\gongzuo\shuju\ecmwf-api-client-python\ecmwfapi\api.py", line 269, in wait
    self.call(self.location, None, "GET")
  File "H:\second year\xiaxueqi\gongzuo\shuju\ecmwf-api-client-python\ecmwfapi\api.py", line 76, in wrapped
    return func(*args,**kwargs)
  File "H:\second year\xiaxueqi\gongzuo\shuju\ecmwf-api-client-python\ecmwfapi\api.py", line 248, in call
    raise APIException("ecmwf.API error 1: %s" % (self.last["error"],) )
APIException: u'ecmwf.API error 1: Task status set to aborted'
>>>



使用到的脚本是:
'dataset' : "interim",
          'step'    : "0",
          'stream'  : "oper",
          'number'  : "all",
          'levtype' : "pl",
          'levelist': "10/20/30/50/70/100/125/150/200/250/300/350/400/450/500/550/600/650/700/750/800/850/900/925/950/975/1000",
          'date'    : "20080701/to/20080710",
          'time'    : "00/06/12/18",
          'origin'  : "all",
          'type'    : "an",
          'param'   : "129.128/133.128/131.128/132.128/130.128/157.128",
          'grid'    : "0.25/0.25",
          'target'  : "H:/second year/xiaxueqi/gongzuo/shuju/ecmwfapi/pl_20080701_20080710.grib"
          })

想问问哪里出错了啊  已经试了几次都不行  我是下载到 移动硬盘的路径
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-6-25 16:45:08 | 显示全部楼层
leeol 发表于 2015-6-23 20:52
不是Python的限制,是欧洲中心的限制,好像是在2G左右

如果不能超过2G的话 那么如果想下载多年的数据 怎么下载啊 楼主的例子 是下载多年的  那岂不是会超过2G?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-6-26 09:37:04 | 显示全部楼层
837078493 发表于 2015-6-25 16:45
如果不能超过2G的话 那么如果想下载多年的数据 怎么下载啊 楼主的例子 是下载多年的  那岂不是会超过2G?

分快下载,我是1年1个变量下载的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-6-29 15:26:28 | 显示全部楼层
楼主好人啊
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-6-30 08:41:56 | 显示全部楼层
这个 python 数据爬虫的功能 python 还有很多数据分析等等
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-7-2 08:02:51 | 显示全部楼层
感谢分享,楼主好人
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-7-7 22:38:52 | 显示全部楼层
xigua 发表于 2014-6-4 21:28
运行example.py,出现错误
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bi ...

我出现了你一样的问题,请问你是怎么解决的
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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