rchlumsk / RavenR

R package for handling Raven hydrologic modelling framework inputs, outputs, and diagnostics
36 stars 16 forks source link

rvn_rvh_cleanhrus #49

Open rchlumsk opened 3 years ago

rchlumsk commented 3 years ago

Requires Area in the subbasin df but this is only produced when reading the rvh file, not when providing a direct data frame

should have a check in this function and automatically tabulate the subbasin areas if needed

rchlumsk commented 3 years ago

Additional issue with this function, the area_tol= xxx other than default causes an issue in merging data frames,

dd <- rvn_rvh_cleanhrus(HRUtab=rvh$HRUtable, SBtab=rvh$SBtable, area_tol=0.05) Error in $<-.data.frame(*tmp*, "remove", value = c(TRUE, TRUE, TRUE, : replacement has 6226 rows, data has 9784

rchlumsk commented 3 years ago

Also add check for duplicate HRU IDs, merge automatically (?) assuming other properties remain the same