diff --git a/man-examples/RunModel.Supervisor.R b/man-examples/RunModel.Supervisor.R index d675c01d1c9a02cd411c246163dc10aa2782ea99..9db04cd28d97cb408a594ceed68800cac4edc4ee 100644 --- a/man-examples/RunModel.Supervisor.R +++ b/man-examples/RunModel.Supervisor.R @@ -45,7 +45,7 @@ PotEvap <- ConvertMeteoSD(griwrm, PotEvapTot) Qobs <- data.frame( Dam = BasinsObs$`54095`$discharge_spec * griwrm$area[griwrm$id == "54095"] * 1E3 ) -Qobs[,] <- Qobs[which(DatesR == "2002-10-01"), 1] +Qobs[,] <- Qobs[which(DatesR == as.POSIXct("2002-10-01")), 1] # InputsModel object IM_severn <- CreateInputsModel(griwrm, DatesR, Precip, PotEvap, Qobs) @@ -96,7 +96,7 @@ CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- seq.int( - which(IM_severn[[1]]$DatesR == "2002-10-15"), + which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15")), length.out = 365 ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) diff --git a/man/CreateController.Rd b/man/CreateController.Rd index 9a07ac3cd3a304dd3e13165165266ffccf52fc77..fcd57d65ee81ad1a56e6e26d59fe4ab6a1272a4a 100644 --- a/man/CreateController.Rd +++ b/man/CreateController.Rd @@ -90,7 +90,7 @@ PotEvap <- ConvertMeteoSD(griwrm, PotEvapTot) Qobs <- data.frame( Dam = BasinsObs$`54095`$discharge_spec * griwrm$area[griwrm$id == "54095"] * 1E3 ) -Qobs[,] <- Qobs[which(DatesR == "2002-10-01"), 1] +Qobs[,] <- Qobs[which(DatesR == as.POSIXct("2002-10-01")), 1] # InputsModel object IM_severn <- CreateInputsModel(griwrm, DatesR, Precip, PotEvap, Qobs) @@ -141,7 +141,7 @@ CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- seq.int( - which(IM_severn[[1]]$DatesR == "2002-10-15"), + which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15")), length.out = 365 ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) diff --git a/man/CreateSupervisor.Rd b/man/CreateSupervisor.Rd index 49a2eed8a3710b854d096c205d81362f5d50c8d9..6d28f25d15e738c236913f139af28c75a6ef1350 100644 --- a/man/CreateSupervisor.Rd +++ b/man/CreateSupervisor.Rd @@ -72,7 +72,7 @@ PotEvap <- ConvertMeteoSD(griwrm, PotEvapTot) Qobs <- data.frame( Dam = BasinsObs$`54095`$discharge_spec * griwrm$area[griwrm$id == "54095"] * 1E3 ) -Qobs[,] <- Qobs[which(DatesR == "2002-10-01"), 1] +Qobs[,] <- Qobs[which(DatesR == as.POSIXct("2002-10-01")), 1] # InputsModel object IM_severn <- CreateInputsModel(griwrm, DatesR, Precip, PotEvap, Qobs) @@ -123,7 +123,7 @@ CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- seq.int( - which(IM_severn[[1]]$DatesR == "2002-10-15"), + which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15")), length.out = 365 ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1) diff --git a/man/RunModel.Supervisor.Rd b/man/RunModel.Supervisor.Rd index dd532938f09952a1843f4f3b8bc8385c5014d597..9bb72a134ffdfebd8d9d83b4b924eb8b94970ea5 100644 --- a/man/RunModel.Supervisor.Rd +++ b/man/RunModel.Supervisor.Rd @@ -69,7 +69,7 @@ PotEvap <- ConvertMeteoSD(griwrm, PotEvapTot) Qobs <- data.frame( Dam = BasinsObs$`54095`$discharge_spec * griwrm$area[griwrm$id == "54095"] * 1E3 ) -Qobs[,] <- Qobs[which(DatesR == "2002-10-01"), 1] +Qobs[,] <- Qobs[which(DatesR == as.POSIXct("2002-10-01")), 1] # InputsModel object IM_severn <- CreateInputsModel(griwrm, DatesR, Precip, PotEvap, Qobs) @@ -120,7 +120,7 @@ CreateController(sv, "DamRelease", Y = c("54095", "54057"), U = c("Dam"), FUN = # GRiwrmRunOptions object simulation of the hydrological year 2002-2003 IndPeriod_Run <- seq.int( - which(IM_severn[[1]]$DatesR == "2002-10-15"), + which(IM_severn[[1]]$DatesR == as.POSIXct("2002-10-15")), length.out = 365 ) IndPeriod_WarmUp <- seq.int(IndPeriod_Run[1] - 366, IndPeriod_Run[1] - 1)