Commit 097552d1 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.3.2.9 CLEAN: unused LatRad argument removed from PE_Oudin fun

parent 56b35a51
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.3.2.8 Version: 1.3.2.9
Date: 2019-05-23 Date: 2019-05-23
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")),
......
...@@ -14,7 +14,7 @@ output: ...@@ -14,7 +14,7 @@ output:
### 1.3.2.8 Release Notes (2019-05-23) ### 1.3.2.9 Release Notes (2019-05-23)
#### New features #### New features
......
PE_Oudin <- function(JD, Temp, PE_Oudin <- function(JD, Temp,
LatRad, Lat, LatUnit = c("rad", "deg"), Lat, LatUnit = c("rad", "deg"),
TimeStepIn = "daily", TimeStepOut = "daily") { TimeStepIn = "daily", TimeStepOut = "daily") {
## ---------- check arguments ## ---------- check arguments
if (!missing(LatRad)) { # if (!missing(LatRad)) {
warning("Deprecated 'LatRad' argument. Please, use 'Lat' instead.") # warning("Deprecated 'LatRad' argument. Please, use 'Lat' instead.")
if (missing(Lat)) { # if (missing(Lat)) {
Lat <- LatRad # Lat <- LatRad
} # }
} # }
if (!(inherits(JD, "numeric") | inherits(JD, "integer"))) { if (!(inherits(JD, "numeric") | inherits(JD, "integer"))) {
stop("'JD' must be of class 'numeric'") stop("'JD' must be of class 'numeric'")
} }
...@@ -126,10 +126,10 @@ PE_Oudin <- function(JD, Temp, ...@@ -126,10 +126,10 @@ PE_Oudin <- function(JD, Temp,
## ---------- disaggregate PE from daily to hourly ## ---------- disaggregate PE from daily to hourly
if (TimeStepOut == "hourly") { if (TimeStepOut == "hourly") {
sinus_D2H <- c(0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, sinus_D2H <- c(0.000, 0.000, 0.000, 0.000, 0.000, 0.000,
0.035, 0.062, 0.079, 0.097, 0.110, 0.117, 0.035, 0.062, 0.079, 0.097, 0.110, 0.117,
0.117, 0.110, 0.097, 0.079, 0.062, 0.035, 0.117, 0.110, 0.097, 0.079, 0.062, 0.035,
0.000, 0.000, 0.000, 0.000, 0.000) 0.000, 0.000, 0.000, 0.000, 0.000, 0.000)
PE_Oudin_H <- rep(PE_Oudin_D, each = 24) * rep(sinus_D2H, times = length(PE_Oudin_D)) PE_Oudin_H <- rep(PE_Oudin_D, each = 24) * rep(sinus_D2H, times = length(PE_Oudin_D))
} }
......
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