Allow to use node with model RunModel_Lag
The easiest way to simulate nodes that represents canal outlets without impluvium should be to use a model RunModel_Lag to only transfer flows from upstream nodes without taking into account potential run-off.
Unfortunately using RunModel_Lag
as a model, raises lot of issues which seems to be related to malfunctions on both airGRiwrm and airGR...
For example the following code based on the data available in the vignette Severn_01 crashes:
db <- data.frame(id = c("54095", "DownLag"),
length = c(1, NA),
down = c("DownLag", NA),
area = as.double(c(3722.68, NA)),
model = c("RunModel_GR4J", "RunModel_Lag"),
stringsAsFactors = FALSE)
g <- CreateGRiwrm(db)
IM <- CreateInputsModel(g,
DatesR = DatesR,
Precip = Precip[, "54095", drop = FALSE],
PotEvap = PotEvap[, "54095", drop = FALSE])
CreateInputsModel.GRiwrm: Processing sub-basin 54095...
CreateInputsModel.GRiwrm: Processing sub-basin DownLag...
Error in if (BasinAreas[length(BasinAreas)] < 0) { :
missing value where TRUE/FALSE needed