2

I'm using R 3.1.2 with RStudio 0.98 on Windows 7 32 bits.

I want to download some weather forecasts files of the GFS model, to be found on an open ftp server, e.g.:

ftp://nomads.ncdc.noaa.gov/GFS/Grid4/201412/20141221/gfs_4_20141221_0000_000.grb2

The internet connection is done through a proxy (.Renviron is properly configured), and I'm basically using the donwload.file function for this purpose.

url <- file.path("ftp://nomads.ncdc.noaa.gov/GFS/Grid4/201412/20141221/gfs_4_20141221_0000_000.grb2")
download.file(url, destfile="temp.grb2", mode="wb")

Where I get the following error message:

trying URL 'ftp://nomads.ncdc.noaa.gov/GFS/Grid4/201412/20141221/gfs_4_20141221_0000_000.grb2' using Synchronous WinInet calls Error in download.file(url, destfile = "temp.grb2", mode = "wb", : cannot open URL 'ftp://nomads.ncdc.noaa.gov/GFS/Grid4/201412/20141221/gfs_4_20141221_0000_000.grb2' In addition: Warning message: In download.file(url, destfile = "temp.grb2", mode = "wb", : InternetOpenUrl failed: 'Operation timed out'

This message appears exactly 30 seconds after running those lines, and no issues appear when downloading a smaller file, such as 'ftp://nomads.ncdc.noaa.gov/GFS/Grid4/201412/20141221/gfs_4_20141221_0000_000.inv', so I assume it's a matter of timeout configuration. Setting: options(timeout=240) doesn't seem to work.

With another computer, using R 3.0.2 with RStudio 0.98 on Windows 8 64 bits, and without using proxy connection, it works perfect.

Any suggestions?

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51
CarlosRH
  • 21
  • 3

0 Answers0