Commit 3a502cfd authored by Bruno Bonte's avatar Bruno Bonte
Browse files

remove ugly comments in /Rfunctions/Rj2k.R

parent 7d9cc6ab
......@@ -178,35 +178,16 @@ j2kSumedValuesAllReachs <- function(attributes, ip="localhost", port="9999") {
# get aggregated values for water balance
j2kWaterBalanceStorages <- function(ip="localhost", port="9999") {
#hruStorageBis <- sum(j2kGetValuesAllHrus(c("actMPS", "actLPS", "actDPS","TotSWE", "actRG1", "actRG2", "storedInterceptedWater")) %>%
# select(-ID))
hruStorage <- sum(j2kSumedValuesAllHrus(c("actMPS", "actLPS", "actDPS","TotSWE", "actRG1", "actRG2", "storedInterceptedWater"))) #%>%
#t() %>%
#as.data.frame() %>%
#rename_all(funs(paste0(.,"bis")))
#reachStorageBis <- sum(j2kGetValuesAllReachs(c("actRD1", "actRD2", "actRG1", "actRG2"))%>%
# select(-ID))
reachStorage <- sum(j2kSumedValuesAllReachs(c("actRD1", "actRD2", "actRG1", "actRG2"))) #%>%
#t() %>%
#as.data.frame() %>%
#rename_all(funs(paste0(.,"bis")))
return(data.frame(hruStorage, reachStorage
#,hruStorageBis, reachStorageBis
))
reachStorage <- sum(j2kSumedValuesAllReachs(c("actRD1", "actRD2", "actRG1", "actRG2")))
return(data.frame(hruStorage, reachStorage))
}
j2kWaterBalanceFlows <- function(ip="localhost", port="9999") {
res = askJ2K(c("command"), c("getCatchmentRunoff"), ip, port)
runoff <- as.numeric(res[[2]])
#runoffBis <- j2kGetOneValueAllReachs("Runoff", c(52001)) %>% select("Runoff") %>% pull()
# runoffBis <- j2kGetOneValueAllReachs("Runoff") %>% filter(ID == 25401) %>% pull()
#if (is.na(runoff)) {
# runoff <- res[[2]]
#}
hrusInOut <- j2kSumedValuesAllHrus(c("rain","snow","etact"))
return(data.frame(runoff,
# runoffBis,
hrusInOut))
return(data.frame(runoff, hrusInOut))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment