Commit 2509e454 authored by David's avatar David
Browse files

test: User defined donor for Delavenne regularization works

Refs #157
Showing with 30 additions and 0 deletions
+30 -0
......@@ -136,6 +136,36 @@ test_that("Lavenne criterion: not upstream a priori nodes are allow if processed
expect_false(is.null(OutputsCalib$`54029`$CritFinal))
})
test_that("Lavenne criterion: redefined calibration order works #157", {
nodes$donor <- nodes$id
nodes$donor[nodes$id == "54095"] <- "54029"
e <- setupRunModel(runRunModel = FALSE,
griwrm = CreateGRiwrm(nodes))
for (x in ls(e)) assign(x, get(x, e))
IC157 <- CreateInputsCrit(
InputsModel = InputsModel,
RunOptions = RunOptions,
Obs = Qobs[IndPeriod_Run, ],
AprioriIds = c(
"54057" = "54032",
"54032" = "54001",
"54095" = "54029"
),
transfo = "sqrt"
)
e <- runCalibration(
nodes = nodes,
Qobs2 = NULL,
InputsCrit = IC157,
CalibOptions = NULL,
FUN_CRIT = ErrorCrit_KGE2,
runRunModel = FALSE,
IsHyst = FALSE
)
for (x in ls(e)) assign(x, get(x, e))
expect_false(is.null(OutputsCalib$`54095`$CritFinal))
})
test_that("Lavenne criterion: current node and a priori node must use the same model", {
InputsModel[["54032"]]$FUN_MOD <- RunModel_GR6J
expect_error(
......
Supports Markdown
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