dimfalk / kostra2010R

R interface for KOSTRA-DWD-2010R dataset
GNU General Public License v3.0
2 stars 0 forks source link

`calc_modelrain()`: check interoperability with `read_stats()` #21

Closed dimfalk closed 2 years ago

dimfalk commented 2 years ago

calc_modelrain(stats, d = 120, tn = 100, type = "EulerI") fails with

error in `[.data.frame`(kostra_5min, , which(attr(tibble, "returnperiods_a") == : 
nicht definierte Spalten gewählt
dimfalk commented 2 years ago

kostra consists of 18 duration levels and 9 return periods stats consists of 21 duration levels (+ 4, 5, 6 d) and 10 return periods (+25 a)

quick & dirty fix: stats <- stats[1:18, c(1:8, 10:12)]