Commit 94cc93fe authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.0.12.1 PEdaily_Oudin now return an error when LatUnit is wrong

Showing with 5 additions and 1 deletion
+5 -1
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.12.0 Version: 1.0.12.1
Date: 2018-08-28 Date: 2018-08-28
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -7,6 +7,10 @@ PEdaily_Oudin <- function(JD, Temp, LatRad, Lat, LatUnit = c("rad", "deg")) { ...@@ -7,6 +7,10 @@ PEdaily_Oudin <- function(JD, Temp, LatRad, Lat, LatUnit = c("rad", "deg")) {
} }
} }
if (!any(LatUnit %in%c("rad", "deg"))) {
stop("\"LatUnit\" must be \"rad\" or \"deg\".")
}
PE_Oudin_D <- rep(NA, length(Temp)) PE_Oudin_D <- rep(NA, length(Temp))
if (LatUnit[1L] == "rad") { if (LatUnit[1L] == "rad") {
......
Supports Markdown
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