Skip to content
Snippets Groups Projects
Commit af237f26 authored by Laura A DeCicco's avatar Laura A DeCicco
Browse files

Added a warning for neg flow.

parent da2e01b9
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,9 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da ...@@ -38,7 +38,9 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da
localDaily$i <- 1:nrow(localDaily) localDaily$i <- 1:nrow(localDaily)
noDataValue <- -999999 noDataValue <- -999999
nd<-ifelse(localDaily$Q==noDataValue,T,F)
nd <- localDaily$Q==noDataValue
localDaily$Q<-ifelse(nd,NA,localDaily$Q) localDaily$Q<-ifelse(nd,NA,localDaily$Q)
zeros<-which(localDaily$Q<=0) zeros<-which(localDaily$Q<=0)
...@@ -49,8 +51,20 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da ...@@ -49,8 +51,20 @@ populateDaily <- function(rawData,qConvert,interactive=TRUE){ # rawData is a da
qshift<- 0.001*mean(localDaily$Q, na.rm=TRUE) qshift<- 0.001*mean(localDaily$Q, na.rm=TRUE)
if (interactive){ if (interactive){
cat("There were ", as.character(nz), " zero flow days \n") negNums <- length(which(localDaily$Q<0))
cat("All days therefore had",as.character(qshift),"cms added to the discharge value.\n") zeroNums <- length(which(localDaily$Q == 0))
if (negNums > 0) {
cat("There were ", as.character(negNums), " negative flow days \n")
cat("Negative values are not supported in the EGRET package\n")
}
if (zeroNums > 0){
cat("There were ", as.character(zeroNums), " zero flow days \n")
}
cat("All days had",as.character(qshift),"cms added to the discharge value.\n")
} }
} else { } else {
qshift<-0.0 qshift<-0.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment