Commit 419baf7e authored by Dorchies David's avatar Dorchies David
Browse files

fix: correctly treat CemaNeige model as a CodeModHydro item

- in former version CodeModHydro was empty for CemaNeige model

Refs #111
parent 8525246a
......@@ -62,8 +62,10 @@
res$TimeStep <- res$TimeStep * 3600
res$TimeStepMean <- as.integer(res$TimeStepMean * 3600)
res$Class <- c(res$TimeUnit, res$Class)
res$CodeModHydro <- res$CodeMod
if (grepl("CemaNeige", res$NameFunMod)) {
res$Class <- c(res$Class, "CemaNeige")
res$CodeModHydro <- gsub("CemaNeige", "", res$CodeMod)
}
res$Class <- res$Class[!is.na(res$Class)]
if (!is.null(DatesR)) {
......@@ -71,7 +73,6 @@
stop("the time step of the model inputs must be ", res$TimeUnit)
}
}
res$CodeModHydro <- gsub("CemaNeige", "", res$CodeMod)
return(res)
}
}
......
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