diff --git a/man-examples/CreateGRiwrm.R b/man-examples/CreateGRiwrm.R index 718deb6b1366893691883b1aa3635b43e3ccdc97..8a05e670426e65ebee63f4c5ad37cb8338394d67 100644 --- a/man-examples/CreateGRiwrm.R +++ b/man-examples/CreateGRiwrm.R @@ -1,3 +1,5 @@ +library(airGRiwrm) + ######################################### # Network of 2 nodes distant of 150 km: # ######################################### diff --git a/man-examples/RunModel.Supervisor.R b/man-examples/RunModel.Supervisor.R index 6eacf4f8e91e432492ae70a762af9265f93908ea..7eb68c0f3701ae6a118576438a775a62ac92513d 100644 --- a/man-examples/RunModel.Supervisor.R +++ b/man-examples/RunModel.Supervisor.R @@ -2,9 +2,9 @@ # An example of reservoir management on an hypothetical dam at station "54095" # on the Severn river build to support low-flows at "54057" ############################################################################### -# A minimum flow of 20 m3/s is maintained at the dam location and an extra-release +# A minimum flow of 50 m3/s is maintained at the dam location and an extra-release # is provided when the flow at the downstream station "54057" cross a minimum -# threshold of 45 m3/s. The dam has a storage capacity of 60 millions m3 +# threshold of 65 m3/s. The dam has a storage capacity of 650 millions m3 ############################################################################### library(airGRiwrm) @@ -57,6 +57,8 @@ sv <- CreateSupervisor(IM_severn) # The Supervisor variable is an environment which can be available in # the controller function for storing and exchange data during the simulation sv$Vres <- 0 # Reservoir storage time series +# Record of the last decision to estimate the natural flow +sv$lastU <- 0 # Dam management is modeled by a controller # This controller usually releases Qmin and provides @@ -70,15 +72,20 @@ sv$Vres <- 0 # Reservoir storage time series factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { function(Y) { # Filling of the reservoir - sv$Vres <- c(sv$Vres, tail(sv$Vres, 1) + Y[1]) + V <- sv$Vres[length(sv$Vres)] + Y[1] + # Estimate natural flow at low-flow support location + Qnat <- Y[2] - sv$lastU # The release is the max between: overflow, low-flow support and minimum flow - U <- U <- max(tail(sv$Vres, 1) - Vmax, Qthreshold - Y[2], Qmin) - sv$Vres[length(sv$Vres)] <- tail(sv$Vres, 1) - U - if (tail(sv$Vres, 1) < Vmin) { + U <- max(V - Vmax, Qthreshold - Qnat, Qmin) + V <- V - U + if (V < Vmin) { # Reservoir is empty - U <- U - (Vmin - tail(sv$Vres, 1)) - sv$Vres[length(sv$Vres)] <- Vmin + U <- U - (Vmin - V) + V <- Vmin } + # Record state of the reservoir and release + sv$Vres[length(sv$Vres) + 1] <- V + sv$lastU <- U return(U) } } @@ -87,17 +94,17 @@ factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { funDamLogic <- factoryDamLogic( sv = sv, # The Supervisor which store the states of reservoir storage Vmin = 0, # Minimum volume in the reservoir (m3) - Vmax = 60 * 1E6, # Maximum volume in the reservoir (m3) - Qmin = 20 * 86400, # Min flow to maintain downstream the reservoir (m3/day) - Qthreshold = 45 * 86400 # Min flow threshold to support at station 54057 (m3/day) + Vmax = 650 * 1E6, # Maximum volume in the reservoir (m3) + Qmin = 50 * 86400, # Min flow to maintain downstream the reservoir (m3/day) + Qthreshold = 65 * 86400 # Min flow threshold to support at station 54057 (m3/day) ) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- which( - DatesR >= as.POSIXct("2002-10-15", tz = "UTC") & - DatesR <= as.POSIXct("2003-10-15", tz = "UTC") + DatesR >= as.POSIXct("2002-11-01", tz = "UTC") & + DatesR <= as.POSIXct("2003-11-01", tz = "UTC") ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) RO_severn <- CreateRunOptions( @@ -111,14 +118,16 @@ P_severn <- readRDS(system.file("vignettes", "ParamV02.RDS", package = "airGRiwr # The Supervisor is used instead of InputsModel for running the model OM_dam <- RunModel(sv, - RunOptions = RO_severn, - Param = P_severn) + RunOptions = RO_severn, + Param = P_severn) # Plotting the time series of flows and reservoir storage oldpar <- par(mfrow=c(2,1), mar = c(2.5,4,1,1)) plot(attr(OM_dam, "Qm3s")[, c("DatesR", "54095", "Dam", "54057")], ylim = c(0, 200)) Vres <- data.frame(DatesR = attr(OM_dam, "Qm3s")$DatesR, - V_reservoir = sv$Vres) -plot.Qm3s(Vres) + V_reservoir = sv$Vres / 1E6) +plot.Qm3s(Vres, + main = "Simulated reservoir storage", + ylab = expression("Storage (Mm"^"3" * ")")) par(oldpar) diff --git a/man/CreateController.Rd b/man/CreateController.Rd index 93c1021881deccf5b70c0c29573c50d042492f12..ea3ff25ae6349a4d6aa4c64dee65ce0bf6a88660 100644 --- a/man/CreateController.Rd +++ b/man/CreateController.Rd @@ -47,9 +47,9 @@ at their location for the current time step of calculation of the model. # An example of reservoir management on an hypothetical dam at station "54095" # on the Severn river build to support low-flows at "54057" ############################################################################### -# A minimum flow of 20 m3/s is maintained at the dam location and an extra-release +# A minimum flow of 50 m3/s is maintained at the dam location and an extra-release # is provided when the flow at the downstream station "54057" cross a minimum -# threshold of 45 m3/s. The dam has a storage capacity of 60 millions m3 +# threshold of 65 m3/s. The dam has a storage capacity of 650 millions m3 ############################################################################### library(airGRiwrm) @@ -102,6 +102,8 @@ sv <- CreateSupervisor(IM_severn) # The Supervisor variable is an environment which can be available in # the controller function for storing and exchange data during the simulation sv$Vres <- 0 # Reservoir storage time series +# Record of the last decision to estimate the natural flow +sv$lastU <- 0 # Dam management is modeled by a controller # This controller usually releases Qmin and provides @@ -115,15 +117,20 @@ sv$Vres <- 0 # Reservoir storage time series factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { function(Y) { # Filling of the reservoir - sv$Vres <- c(sv$Vres, tail(sv$Vres, 1) + Y[1]) + V <- sv$Vres[length(sv$Vres)] + Y[1] + # Estimate natural flow at low-flow support location + Qnat <- Y[2] - sv$lastU # The release is the max between: overflow, low-flow support and minimum flow - U <- U <- max(tail(sv$Vres, 1) - Vmax, Qthreshold - Y[2], Qmin) - sv$Vres[length(sv$Vres)] <- tail(sv$Vres, 1) - U - if (tail(sv$Vres, 1) < Vmin) { + U <- max(V - Vmax, Qthreshold - Qnat, Qmin) + V <- V - U + if (V < Vmin) { # Reservoir is empty - U <- U - (Vmin - tail(sv$Vres, 1)) - sv$Vres[length(sv$Vres)] <- Vmin + U <- U - (Vmin - V) + V <- Vmin } + # Record state of the reservoir and release + sv$Vres[length(sv$Vres) + 1] <- V + sv$lastU <- U return(U) } } @@ -132,17 +139,17 @@ factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { funDamLogic <- factoryDamLogic( sv = sv, # The Supervisor which store the states of reservoir storage Vmin = 0, # Minimum volume in the reservoir (m3) - Vmax = 60 * 1E6, # Maximum volume in the reservoir (m3) - Qmin = 20 * 86400, # Min flow to maintain downstream the reservoir (m3/day) - Qthreshold = 45 * 86400 # Min flow threshold to support at station 54057 (m3/day) + Vmax = 650 * 1E6, # Maximum volume in the reservoir (m3) + Qmin = 50 * 86400, # Min flow to maintain downstream the reservoir (m3/day) + Qthreshold = 65 * 86400 # Min flow threshold to support at station 54057 (m3/day) ) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- which( - DatesR >= as.POSIXct("2002-10-15", tz = "UTC") & - DatesR <= as.POSIXct("2003-10-15", tz = "UTC") + DatesR >= as.POSIXct("2002-11-01", tz = "UTC") & + DatesR <= as.POSIXct("2003-11-01", tz = "UTC") ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) RO_severn <- CreateRunOptions( @@ -156,15 +163,17 @@ P_severn <- readRDS(system.file("vignettes", "ParamV02.RDS", package = "airGRiwr # The Supervisor is used instead of InputsModel for running the model OM_dam <- RunModel(sv, - RunOptions = RO_severn, - Param = P_severn) + RunOptions = RO_severn, + Param = P_severn) # Plotting the time series of flows and reservoir storage oldpar <- par(mfrow=c(2,1), mar = c(2.5,4,1,1)) plot(attr(OM_dam, "Qm3s")[, c("DatesR", "54095", "Dam", "54057")], ylim = c(0, 200)) Vres <- data.frame(DatesR = attr(OM_dam, "Qm3s")$DatesR, - V_reservoir = sv$Vres) -plot.Qm3s(Vres) + V_reservoir = sv$Vres / 1E6) +plot.Qm3s(Vres, + main = "Simulated reservoir storage", + ylab = expression("Storage (Mm"^"3" * ")")) par(oldpar) } diff --git a/man/CreateGRiwrm.Rd b/man/CreateGRiwrm.Rd index f2ee4db078b466de81be4b225cb94036b87da3b3..cce3bc94ab956df41e2c0dfacc8905b9c8b13300 100644 --- a/man/CreateGRiwrm.Rd +++ b/man/CreateGRiwrm.Rd @@ -75,6 +75,8 @@ diversion } } \examples{ +library(airGRiwrm) + ######################################### # Network of 2 nodes distant of 150 km: # ######################################### diff --git a/man/CreateInputsModel.GRiwrm.Rd b/man/CreateInputsModel.GRiwrm.Rd index 9a438b0061505b4c1de25efb53f0d3191ffb97bc..f77b5cebec78cbbdab61ae6f8839cfb17ede6077 100644 --- a/man/CreateInputsModel.GRiwrm.Rd +++ b/man/CreateInputsModel.GRiwrm.Rd @@ -142,7 +142,7 @@ db <- data.frame(id = c("Reservoir", "GaugingDown"), # Create GRiwrm object from the data.frame griwrm <- CreateGRiwrm(db) -str(griwrm) +plot(griwrm) # Formatting observations for the hydrological models # Each input data should be a matrix or a data.frame with the good id in the name of the column diff --git a/man/CreateRunOptions.Rd b/man/CreateRunOptions.Rd index 51c0478531a6d9864f02d6f654f2b9dbce81ecdd..b2765e8075bfaed8408b1a6941a7b60b585e4657 100644 --- a/man/CreateRunOptions.Rd +++ b/man/CreateRunOptions.Rd @@ -85,7 +85,7 @@ db <- data.frame(id = c("Reservoir", "GaugingDown"), # Create GRiwrm object from the data.frame griwrm <- CreateGRiwrm(db) -str(griwrm) +plot(griwrm) # Formatting observations for the hydrological models # Each input data should be a matrix or a data.frame with the good id in the name of the column diff --git a/man/CreateSupervisor.Rd b/man/CreateSupervisor.Rd index 053aa41c25ff3b4f114c217b7ff429ce03b292d1..526ff375da94bb05218cef8ab78eeb9fa26a3678 100644 --- a/man/CreateSupervisor.Rd +++ b/man/CreateSupervisor.Rd @@ -29,9 +29,9 @@ Creation of a Supervisor for handling regulation in a model # An example of reservoir management on an hypothetical dam at station "54095" # on the Severn river build to support low-flows at "54057" ############################################################################### -# A minimum flow of 20 m3/s is maintained at the dam location and an extra-release +# A minimum flow of 50 m3/s is maintained at the dam location and an extra-release # is provided when the flow at the downstream station "54057" cross a minimum -# threshold of 45 m3/s. The dam has a storage capacity of 60 millions m3 +# threshold of 65 m3/s. The dam has a storage capacity of 650 millions m3 ############################################################################### library(airGRiwrm) @@ -84,6 +84,8 @@ sv <- CreateSupervisor(IM_severn) # The Supervisor variable is an environment which can be available in # the controller function for storing and exchange data during the simulation sv$Vres <- 0 # Reservoir storage time series +# Record of the last decision to estimate the natural flow +sv$lastU <- 0 # Dam management is modeled by a controller # This controller usually releases Qmin and provides @@ -97,15 +99,20 @@ sv$Vres <- 0 # Reservoir storage time series factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { function(Y) { # Filling of the reservoir - sv$Vres <- c(sv$Vres, tail(sv$Vres, 1) + Y[1]) + V <- sv$Vres[length(sv$Vres)] + Y[1] + # Estimate natural flow at low-flow support location + Qnat <- Y[2] - sv$lastU # The release is the max between: overflow, low-flow support and minimum flow - U <- U <- max(tail(sv$Vres, 1) - Vmax, Qthreshold - Y[2], Qmin) - sv$Vres[length(sv$Vres)] <- tail(sv$Vres, 1) - U - if (tail(sv$Vres, 1) < Vmin) { + U <- max(V - Vmax, Qthreshold - Qnat, Qmin) + V <- V - U + if (V < Vmin) { # Reservoir is empty - U <- U - (Vmin - tail(sv$Vres, 1)) - sv$Vres[length(sv$Vres)] <- Vmin + U <- U - (Vmin - V) + V <- Vmin } + # Record state of the reservoir and release + sv$Vres[length(sv$Vres) + 1] <- V + sv$lastU <- U return(U) } } @@ -114,17 +121,17 @@ factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { funDamLogic <- factoryDamLogic( sv = sv, # The Supervisor which store the states of reservoir storage Vmin = 0, # Minimum volume in the reservoir (m3) - Vmax = 60 * 1E6, # Maximum volume in the reservoir (m3) - Qmin = 20 * 86400, # Min flow to maintain downstream the reservoir (m3/day) - Qthreshold = 45 * 86400 # Min flow threshold to support at station 54057 (m3/day) + Vmax = 650 * 1E6, # Maximum volume in the reservoir (m3) + Qmin = 50 * 86400, # Min flow to maintain downstream the reservoir (m3/day) + Qthreshold = 65 * 86400 # Min flow threshold to support at station 54057 (m3/day) ) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- which( - DatesR >= as.POSIXct("2002-10-15", tz = "UTC") & - DatesR <= as.POSIXct("2003-10-15", tz = "UTC") + DatesR >= as.POSIXct("2002-11-01", tz = "UTC") & + DatesR <= as.POSIXct("2003-11-01", tz = "UTC") ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) RO_severn <- CreateRunOptions( @@ -138,15 +145,17 @@ P_severn <- readRDS(system.file("vignettes", "ParamV02.RDS", package = "airGRiwr # The Supervisor is used instead of InputsModel for running the model OM_dam <- RunModel(sv, - RunOptions = RO_severn, - Param = P_severn) + RunOptions = RO_severn, + Param = P_severn) # Plotting the time series of flows and reservoir storage oldpar <- par(mfrow=c(2,1), mar = c(2.5,4,1,1)) plot(attr(OM_dam, "Qm3s")[, c("DatesR", "54095", "Dam", "54057")], ylim = c(0, 200)) Vres <- data.frame(DatesR = attr(OM_dam, "Qm3s")$DatesR, - V_reservoir = sv$Vres) -plot.Qm3s(Vres) + V_reservoir = sv$Vres / 1E6) +plot.Qm3s(Vres, + main = "Simulated reservoir storage", + ylab = expression("Storage (Mm"^"3" * ")")) par(oldpar) } diff --git a/man/RunModel.GRiwrmInputsModel.Rd b/man/RunModel.GRiwrmInputsModel.Rd index a87734567e37ae701cdfbea76d0696324bba1bf0..9d422327ae1c5f56770c3732199524fc72258b53 100644 --- a/man/RunModel.GRiwrmInputsModel.Rd +++ b/man/RunModel.GRiwrmInputsModel.Rd @@ -63,7 +63,7 @@ db <- data.frame(id = c("Reservoir", "GaugingDown"), # Create GRiwrm object from the data.frame griwrm <- CreateGRiwrm(db) -str(griwrm) +plot(griwrm) # Formatting observations for the hydrological models # Each input data should be a matrix or a data.frame with the good id in the name of the column diff --git a/man/RunModel.Supervisor.Rd b/man/RunModel.Supervisor.Rd index 540bc339d495580bd6b64944710a3c773954b0ac..cf6ae036cfaf5de42d79adc392392f284f6424f1 100644 --- a/man/RunModel.Supervisor.Rd +++ b/man/RunModel.Supervisor.Rd @@ -26,9 +26,9 @@ RunModel function for a GRiwrmInputsModel object # An example of reservoir management on an hypothetical dam at station "54095" # on the Severn river build to support low-flows at "54057" ############################################################################### -# A minimum flow of 20 m3/s is maintained at the dam location and an extra-release +# A minimum flow of 50 m3/s is maintained at the dam location and an extra-release # is provided when the flow at the downstream station "54057" cross a minimum -# threshold of 45 m3/s. The dam has a storage capacity of 60 millions m3 +# threshold of 65 m3/s. The dam has a storage capacity of 650 millions m3 ############################################################################### library(airGRiwrm) @@ -81,6 +81,8 @@ sv <- CreateSupervisor(IM_severn) # The Supervisor variable is an environment which can be available in # the controller function for storing and exchange data during the simulation sv$Vres <- 0 # Reservoir storage time series +# Record of the last decision to estimate the natural flow +sv$lastU <- 0 # Dam management is modeled by a controller # This controller usually releases Qmin and provides @@ -94,15 +96,20 @@ sv$Vres <- 0 # Reservoir storage time series factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { function(Y) { # Filling of the reservoir - sv$Vres <- c(sv$Vres, tail(sv$Vres, 1) + Y[1]) + V <- sv$Vres[length(sv$Vres)] + Y[1] + # Estimate natural flow at low-flow support location + Qnat <- Y[2] - sv$lastU # The release is the max between: overflow, low-flow support and minimum flow - U <- U <- max(tail(sv$Vres, 1) - Vmax, Qthreshold - Y[2], Qmin) - sv$Vres[length(sv$Vres)] <- tail(sv$Vres, 1) - U - if (tail(sv$Vres, 1) < Vmin) { + U <- max(V - Vmax, Qthreshold - Qnat, Qmin) + V <- V - U + if (V < Vmin) { # Reservoir is empty - U <- U - (Vmin - tail(sv$Vres, 1)) - sv$Vres[length(sv$Vres)] <- Vmin + U <- U - (Vmin - V) + V <- Vmin } + # Record state of the reservoir and release + sv$Vres[length(sv$Vres) + 1] <- V + sv$lastU <- U return(U) } } @@ -111,17 +118,17 @@ factoryDamLogic <- function(sv, Vmin, Vmax, Qmin, Qthreshold) { funDamLogic <- factoryDamLogic( sv = sv, # The Supervisor which store the states of reservoir storage Vmin = 0, # Minimum volume in the reservoir (m3) - Vmax = 60 * 1E6, # Maximum volume in the reservoir (m3) - Qmin = 20 * 86400, # Min flow to maintain downstream the reservoir (m3/day) - Qthreshold = 45 * 86400 # Min flow threshold to support at station 54057 (m3/day) + Vmax = 650 * 1E6, # Maximum volume in the reservoir (m3) + Qmin = 50 * 86400, # Min flow to maintain downstream the reservoir (m3/day) + Qthreshold = 65 * 86400 # Min flow threshold to support at station 54057 (m3/day) ) CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = funDamLogic) # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- which( - DatesR >= as.POSIXct("2002-10-15", tz = "UTC") & - DatesR <= as.POSIXct("2003-10-15", tz = "UTC") + DatesR >= as.POSIXct("2002-11-01", tz = "UTC") & + DatesR <= as.POSIXct("2003-11-01", tz = "UTC") ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) RO_severn <- CreateRunOptions( @@ -135,15 +142,17 @@ P_severn <- readRDS(system.file("vignettes", "ParamV02.RDS", package = "airGRiwr # The Supervisor is used instead of InputsModel for running the model OM_dam <- RunModel(sv, - RunOptions = RO_severn, - Param = P_severn) + RunOptions = RO_severn, + Param = P_severn) # Plotting the time series of flows and reservoir storage oldpar <- par(mfrow=c(2,1), mar = c(2.5,4,1,1)) plot(attr(OM_dam, "Qm3s")[, c("DatesR", "54095", "Dam", "54057")], ylim = c(0, 200)) Vres <- data.frame(DatesR = attr(OM_dam, "Qm3s")$DatesR, - V_reservoir = sv$Vres) -plot.Qm3s(Vres) + V_reservoir = sv$Vres / 1E6) +plot.Qm3s(Vres, + main = "Simulated reservoir storage", + ylab = expression("Storage (Mm"^"3" * ")")) par(oldpar) } diff --git a/man/plot.GRiwrm.Rd b/man/plot.GRiwrm.Rd index ff59579bf370a7530878c2b8120e07f360a2a7c6..427e3c36c04d986e737d4c891e2cd19484fd49bc 100644 --- a/man/plot.GRiwrm.Rd +++ b/man/plot.GRiwrm.Rd @@ -41,6 +41,8 @@ This function only works inside RStudio because the HTMLwidget produced by Diagr is not handled on some platforms } \examples{ +library(airGRiwrm) + ######################################### # Network of 2 nodes distant of 150 km: # ######################################### diff --git a/man/plot.GRiwrmOutputsModel.Rd b/man/plot.GRiwrmOutputsModel.Rd index a2f12a09d49e28228f10befe657c404c61ca4fa0..0ea11c62df8360f34a3892def1bb7a48be26dcbf 100644 --- a/man/plot.GRiwrmOutputsModel.Rd +++ b/man/plot.GRiwrmOutputsModel.Rd @@ -63,7 +63,7 @@ db <- data.frame(id = c("Reservoir", "GaugingDown"), # Create GRiwrm object from the data.frame griwrm <- CreateGRiwrm(db) -str(griwrm) +plot(griwrm) # Formatting observations for the hydrological models # Each input data should be a matrix or a data.frame with the good id in the name of the column diff --git a/man/plot.Qm3s.Rd b/man/plot.Qm3s.Rd index 2bb899b633fa59113db059f8936f716c3e485eb2..74f969ca3e86e14e0d7f5894913b89df0d851914 100644 --- a/man/plot.Qm3s.Rd +++ b/man/plot.Qm3s.Rd @@ -94,7 +94,7 @@ db <- data.frame(id = c("Reservoir", "GaugingDown"), # Create GRiwrm object from the data.frame griwrm <- CreateGRiwrm(db) -str(griwrm) +plot(griwrm) # Formatting observations for the hydrological models # Each input data should be a matrix or a data.frame with the good id in the name of the column diff --git a/vignettes/V06_Modelling_regulated_diversion.Rmd b/vignettes/V06_Modelling_regulated_diversion.Rmd index 1ccc7d41ac083314de5a2664752010fcbf91cfae..cc82cc5c694b35884b3bb3a6633356240c8a73a5 100644 --- a/vignettes/V06_Modelling_regulated_diversion.Rmd +++ b/vignettes/V06_Modelling_regulated_diversion.Rmd @@ -151,7 +151,7 @@ CreateController(sv, First we need to create a `GRiwrmRunOptions` object and load the parameters calibrated in the vignette "V02_Calibration_SD_model": ```{r} -# Running simulation between 2002 and 2005 +# Running simulation on year 2003 IndPeriod_Run <- which( DatesR >= as.POSIXct("2003-03-01", tz = "UTC") & DatesR <= as.POSIXct("2004-01-01", tz = "UTC") @@ -163,8 +163,8 @@ RunOptions <- CreateRunOptions(IM_div, ParamV02 <- readRDS(system.file("vignettes", "ParamV02.RDS", package = "airGRiwrm")) ``` -The node "54029" was initially an upstream node. As it receive water from "54001" -it is no longer an upstream node and need a parameter for routing its upstream +The node "54029" was initially an upstream node. As it receives water from "54001" +it is no longer an upstream node and needs a parameter for routing its upstream flows. We arbitrary say that the velocity in the channel between "54001" and "54029" is 1 m/s.