brry / rdwd

download climate data from DWD (German Weather Service)

Home Page:https://bookdown.org/brry/rdwd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem when downloading data

mmorenozam opened this issue · comments

Dear Berry,

I would like to first thank you for writing rdwd. I found the package quite interesting. I started it using a couple of days ago, and I have found an issue when downloading data that I hope you might help me.

Let me illustrate this with a little example. By running the following code:

library(rdwd)

link <- selectDWD(c("Potsdam"), res="hourly", var="sun", per="hist")
pdata <- dataDWD(link)

I get this message:

Warning message:
1 Download has failed (out of 1). Setting read=FALSE.
download.file error:
cannot open URL 'ftp://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/hourly/sun/historical/stundenwerte_SD_03987_18930101_20181231_hist.zip' 

If I manually change the last piece of the string "link" from 20181231 to 20191231, it works.

Is this a problem of my installation? (I am using R 4.0.1, with RStudio 1.2.5042 and rdwd 1.3.1 in Windows 7).

I tried updating to rdwd 1.3.13 via the updateRdwd command, but I get this error:

Error : (converted from warning) C:/Users/mmorenozam/AppData/Local/Temp/RtmpMNcjbL/R.INSTALL6484896499/rdwd/man/plotRadar.Rd:46: unknown macro '\rcode'
ERROR: installing Rd objects failed for package 'rdwd'

I have installed berryFunctions 1.19.3, and still cannot update.

Waiting for your answer,
Best
Mauricio

Yes, if you update to the latest version, the fileIndex is updated with the historical data ending 2019, not 2018.
The rcode doc error got introduced accidentally three days ago in f8f2569#diff-23cf1e323fef03f5f0ff0396c0a5281bR49
Not sure why my local install succeeded - it should have caught that one.

Thanks for reporting it, will be fixed in a minute.