diff --git a/R/ConvertMeteoSD.R b/R/ConvertMeteoSD.R index ea3ed7cdc2a73375912e627ffb59a774116f56c7..6da9fd2719710e53d730c62acbaaa671a7232277 100644 --- a/R/ConvertMeteoSD.R +++ b/R/ConvertMeteoSD.R @@ -26,7 +26,7 @@ ConvertMeteoSD.GRiwrm <- function(x, meteo, ...) { #' @export #' @rdname ConvertMeteoSD ConvertMeteoSD.character <- function(x, griwrm, meteo, ...) { - upperBasins <- !is.na(griwrm$down) & griwrm$down == x + upperBasins <- !is.na(griwrm$down) & griwrm$down == x & !is.na(griwrm$area) if(all(!upperBasins)) { return(meteo[,x]) }