Commit 68eea172 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.8.45 UPDATE: useless PrecipSim_CemaNeige column removed from the output...

v0.2.8.45 UPDATE: useless PrecipSim_CemaNeige column removed from the output of the as.data.frame.airGRt function
parent e5df2cd8
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.8.44
Version: 0.2.8.45
Date: 2020-02-26
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
......
......@@ -4,7 +4,7 @@
### 0.2.8.44 Release Notes (2020-02-26)
### 0.2.8.45 Release Notes (2020-02-26)
#### New features
......
......@@ -7,7 +7,6 @@ as.data.frame.airGRt <- function(x, row.names = NULL, ...) {
TMGR <- .TypeModelGR(x)
myGR <- list()
myGR$PrecipSim <- NA
myGR$FracSolid <- NA
myGR$TempMean <- NA
......@@ -17,7 +16,6 @@ as.data.frame.airGRt <- function(x, row.names = NULL, ...) {
PrecipSim <- rowMeans(as.data.frame(x$InputsModel$LayerPrecip), na.rm = TRUE)
FracSolid <- PrecipSol / PrecipSim
FracSolid <- ifelse(is.na(FracSolid) & PrecipSol == 0 & PrecipSim == 0, 0, FracSolid)
myGR$PrecipSim <- PrecipSim
myGR$FracSolid <- FracSolid
TempMean <- rowMeans(as.data.frame(x$InputsModel$LayerTempMean), na.rm = TRUE)
myGR$TempMean <- TempMean
......@@ -34,7 +32,6 @@ as.data.frame.airGRt <- function(x, row.names = NULL, ...) {
PrecipSim <- rowMeans(sapply(x$OutputsModel$CemaNeigeLayers, "[[", "Pliq"), na.rm = TRUE) + PrecipSol
FracSolid <- PrecipSol / PrecipSim
FracSolid <- ifelse(is.na(FracSolid) & PrecipSol == 0 & PrecipSim == 0, 0, FracSolid)
myGR$PrecipSim <- PrecipSim
myGR$FracSolid <- FracSolid
TempMean <- rowMeans(sapply(x$OutputsModel$CemaNeigeLayers, "[[", "Temp"), na.rm = TRUE)
myGR$TempMean <- TempMean
......@@ -48,7 +45,6 @@ as.data.frame.airGRt <- function(x, row.names = NULL, ...) {
TabSim <- data.frame(Dates = myGR$DatesR,
PotEvap = myGR$PotEvap,
PrecipObs = myGR$Precip,
PrecipSim_CemaNeige = myGR$PrecipSim,
PrecipFracSolid_CemaNeige = myGR$FracSolid,
TempMeanSim_CemaNeige = myGR$TempMean,
Qobs = myGR$Qobs,
......
......@@ -799,7 +799,7 @@ shinyServer(function(input, output, session) {
if (getPrep()$isUngauged) {
TabSim$Qobs <- NA
}
colnames(TabSim) <- sprintf("%s [%s]", colnames(TabSim), c("-", rep("mm", 3), "-", "°C", rep("mm", 2)))
colnames(TabSim) <- sprintf("%s [%s]", colnames(TabSim), c("-", rep("mm", 2), "-", "°C", rep("mm", 2)))
colnames(TabSim) <- ifelse(grepl("mm", colnames(TabSim)),
gsub("mm", paste0("mm/", .TypeModelGR(getSim()$SIM)$TimeUnit), colnames(TabSim)),
colnames(TabSim))
......
......@@ -27,7 +27,6 @@
\item{Dates}{[POSIXct] vector of dates}
\item{PotEvap}{[numeric] time series of potential evapotranspiration (catchment average) [mm/time step]}
\item{PrecipObs}{[numeric] time series of total precipitation (catchment average) [mm/time step]}
\item{PrecipSim_CemaNeige}{[numeric] time series of precipitation (layer average) [mm/time step],
must be defined if CemaNeige is used}
\item{PrecipFracSolid_CemaNeige}{[numeric] time series of solid precipitation fraction (layer average) [-],
must be defined if CemaNeige is used}
......
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