ropensci / rnoaa

R interface to many NOAA data APIs
https://docs.ropensci.org/rnoaa
Other
328 stars 84 forks source link

Use http instead of ftp for GHCN? #353

Closed eliocamp closed 4 years ago

eliocamp commented 4 years ago

I'm downloading GHCN data and coming up into time-out issues when using the package. It's probably not an bug in the package but a problem with my institution's connection, with which I regularly encounter problems when downloading from FTPs. However, I realised that the data is accesible via good old http (e.g. here). I changed the internal function ghcndbase to

ghcndbase <- function() "https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/all"

and now my script is churning away, happily downloading data. Would it be possible to add an argument so that the user could select http download instead of ftp?

johnrharley commented 4 years ago

I've also been having timeout issues recently with the FTP requests, it may be because NCEI appears to be migrating some of their data paths to https://www.ncei.noaa.gov, see for instance the NODC banner as of June 8th.

The current FTP address appears to be working intermittently for me now, but it might need to be updated as NCEI migrates. Currently it's possible to access GHCN data through

ftp://ftp.ncei.noaa.gov/pub/data/ghcn/daily/

but I am also having timeout issues there.

sckott commented 4 years ago

I'm just noticing the timeouts as well. Thanks for the issue @eliocamp and for the useful info @johnrharley - I"ll have a look. I'm not sure if I can allow the base url to be changed, but we'll see

sckott commented 4 years ago

I've made a change in a branch ghcnd-base-url . if you want to try - remotes::install_github("ropensci/rnoaa@ghcnd-base-url") , then see the last example in ?ghcnd - and in that branch the base url is changed to the https one above

sckott commented 4 years ago

merged