From 94cc93fea3a144768a0c52ffe9718343c675a14c Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Tue, 28 Aug 2018 14:45:03 +0200 Subject: [PATCH] v1.0.12.1 PEdaily_Oudin now return an error when LatUnit is wrong --- DESCRIPTION | 2 +- R/PEdaily_Oudin.R | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index cd123566..372bd31a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.0.12.0 +Version: 1.0.12.1 Date: 2018-08-28 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/R/PEdaily_Oudin.R b/R/PEdaily_Oudin.R index a896a0f7..4105fe9a 100644 --- a/R/PEdaily_Oudin.R +++ b/R/PEdaily_Oudin.R @@ -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)) if (LatUnit[1L] == "rad") { -- GitLab