爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5133|回复: 1

[海洋] 请问如何用CFSR官网提供的wget脚本下载数据

[复制链接]

新浪微博达人勋

发表于 2017-6-2 08:44:05 | 显示全部楼层 |阅读模式

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

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

x
最近需要下载CFSR上的风场数据,发现网站上提供几种方法,有一种可以利用wget批量下载,网站上会生成一段脚本,想在windows的 wget下载,请问有没有大侠指导下 如何操作 我根据提示改了用户名和密码以及取消了证书检查的注释 还是不成功 不知道原因 脚本我贴下面了 谢谢大家


:: DOS batch script to download selected files from rda.ucar.edu using Wget
::
:: Experienced Wget Users: add additional command-line flags here
::   Use the -r (--recursive) option with care
::   Do NOT use the -b (--background) option - simultaneous file downloads
::       can cause your data access to be blocked
set opts = "-N"
::
:: Replace "xxxxxx" with your rda.ucar.edu password on the next uncommented line
set passwd = "xxxxxx"
::
set cert_opt = ""
:: If you get a certificate verification error (version 1.10 or higher),
:: uncomment the following line:
set cert_opt = "--no-check-certificate"
::
if ($passwd == "xxxxxx") then
  echo "You need to set your password before you can continue"
  echo "  see the documentation in the script"
  exit
endif
::
:: authenticate - NOTE: You should only execute this command ONE TIME.
:: Executing this command for every data file you download may cause
:: your download privileges to be suspended.
wget %cert_opt% -O auth_status.rda.ucar.edu --save-cookies auth.rda.ucar.edu --post-data="email=xxxxxx&passwd=%passwd%&action=login" https://rda.ucar.edu/cgi-bin/login
::
:: download the file(s)
:: NOTE:  if you get 403 Forbidden errors when downloading the data files, check
::        the contents of the file 'auth_status.rda.ucar.edu'
wget %cert_opt% %opts% --load-cookies auth.rda.ucar.edu http://rda.ucar.edu/data/ds093.0/2000/pgbh01.gdas.20000101-20000105.tar
wget %cert_opt% %opts% --load-cookies auth.rda.ucar.edu http://rda.ucar.edu/data/ds093.0/2000/pgbh01.gdas.20000106-20000110.tar

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-4-8 20:53:22 | 显示全部楼层
请问楼主问题解决了吗?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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