diff --git a/DESCRIPTION b/DESCRIPTION index 87a8a82da58d9f239c799318b1f66cbf7d718a37..97a329a62b04aba127eb0c5f1242a54973e2a0e9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGRteaching Type: Package Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included) -Version: 0.2.10.27 +Version: 0.2.10.28 Date: 2020-04-29 Authors@R: c( person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), diff --git a/NEWS.md b/NEWS.md index 539d10203c6a19a6c3ef7965ea6f7e9485e11962..fb1ee1af4494c70313ca943e7397c4632607a24a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ -### 0.2.10.27 Release Notes (2020-04-29) +### 0.2.10.28 Release Notes (2020-04-29) #### New features diff --git a/inst/ShinyGR/server.R b/inst/ShinyGR/server.R index f9accaa1ee00274a0d363153e6e31ae3447d9948..bb33246c4634ea3529020dd90ea280d166228ddc 100644 --- a/inst/ShinyGR/server.R +++ b/inst/ShinyGR/server.R @@ -217,13 +217,13 @@ shinyServer(function(input, output, session) { ## Simulated flows computation PREP <- getPrep()$PREP if (input$HydroModel == "GR2M") { - dd <- trunc(input$Period, units = "months") + SimPer <- trunc(input$Period, units = "months") } else { - dd <- trunc(input$Period, units = "days") + SimPer <- trunc(input$Period, units = "days") } SIM <- SimGR(PrepGR = PREP, Param = PARAM, WupPer = substr(getPrep()$WUPPER, 1, 10), - SimPer = c(substr(dd[1], 1, 10), substr(dd[2], 1, 10)), + SimPer = c(substr(SimPer[1], 1, 10), substr(SimPer[2], 1, 10)), verbose = FALSE) ## Criteria computation @@ -296,14 +296,14 @@ shinyServer(function(input, output, session) { CemaNeige = input$SnowModel == "CemaNeige") } if (input$HydroModel == "GR2M") { - dd <- trunc(input$Period, units = "months") + SimPer <- trunc(input$Period, units = "months") } else { - dd <- trunc(input$Period, units = "days") + SimPer <- trunc(input$Period, units = "days") } SIMold <- SimGR(PrepGR = OBSold, Param = .GlobalEnv$.ShinyGR.hist[[1]]$Param, WupPer = substr(getPrep()$WUPPER, 1, 10), - SimPer = substr(c(dd[1], dd[2]), 1, 10), + SimPer = substr(c(SimPer[1], SimPer[2]), 1, 10), verbose = FALSE) if (!getPrep()$isUngauged) { InputsCritMultiold <- CreateInputsCrit(FUN_CRIT = CRIT_opt$Crit, @@ -867,16 +867,16 @@ shinyServer(function(input, output, session) { # OutputsModel2 <- getData()$OutputsModel # dateEvent <- trunc(input$Event, units = ifelse(input$HydroModel == "GR2M", "months", "days")) if (input$HydroModel == "GR2M") { - dd <- trunc(input$Period, units = "months") + SimPer <- trunc(input$Period, units = "months") dateEvent <- trunc(input$EventGR2M, units = "months") } else { - dd <- trunc(input$Period, units = "days") + SimPer <- trunc(input$Period, units = "days") dateEvent <- trunc(input$Event, units = "days") } par(getPlotPar()$par) try(.DiagramGR(OutputsModel = getData()$OutputsModel, Param = getSim()$PARAM, - SimPer = dd, EventDate = dateEvent, + SimPer = SimPer, EventDate = dateEvent, HydroModel = input$HydroModel, CemaNeige = input$SnowModel == "CemaNeige"), silent = TRUE) }, bg = "transparent")