Commit ea053cbd authored by Dorchies David's avatar Dorchies David
Browse files

fix(RunModel_Lag): error in definition of StateEnd

Refs #78
parent cb8f6522
......@@ -82,9 +82,10 @@ RunModel_Lag <- function(InputsModel, RunOptions, Param) {
# Convert back Qsim to mm
OutputsModel$Qsim <- OutputsModel$Qsim / sum(InputsModel$BasinAreas, na.rm = TRUE) / 1e3
if("StateEnd" %in% RunOptions$Outputs_Sim) {
if ("StateEnd" %in% RunOptions$Outputs_Sim) {
OutputsModel$StateEnd$SD <- lapply(seq(NbUpBasins), function(x) {
Qupstream[(LengthTs - floor(PT[upstream_basin])):LengthTs]})
Qupstream[(LengthTs - floor(PT[x])):LengthTs]
})
}
return(OutputsModel)
......
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