brry / rdwd

download climate data from DWD (German Weather Service)
https://bookdown.org/brry/rdwd
72 stars 13 forks source link

expand per="hr" to all options #33

Closed brry closed 2 years ago

brry commented 3 years ago
selectDWD(id=1050, res=c("daily","monthly"), var="kl", per="hr")

currently returns
dwdbase/daily/kl/historical/**_hist.zip and dwdbase/monthly/kl/recent/**_akt.zip

Should per="hr" expand to all combinations?
Does this extend to id vectors?

brry commented 3 years ago
data(fileIndex, package="rdwd")
id <- unique(fileIndex$id[fileIndex$var=="more_precip"])[1:100]
hist <- rdwd::selectDWD(id=id, res="daily", var="more_precip", per="h", outvec=TRUE)
rece <- rdwd::selectDWD(id=id, res="daily", var="more_precip", per="r", outvec=TRUE)
hist <- hist[hist!=rdwd::dwdbase] # 99 files
rece <- rece[rece!=rdwd::dwdbase] # 23 files

hire <- rdwd::selectDWD(id=id, res="daily", var="more_precip", per="hr") # length 100
# would be length 122 c(hist,rece)