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

Showing with 11 additions and 11 deletions
+11 -11
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.3.2.8
Version: 1.3.2.9
Date: 2019-05-23
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -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
......
PE_Oudin <- function(JD, Temp,
LatRad, Lat, LatUnit = c("rad", "deg"),
Lat, LatUnit = c("rad", "deg"),
TimeStepIn = "daily", TimeStepOut = "daily") {
## ---------- check arguments
if (!missing(LatRad)) {
warning("Deprecated 'LatRad' argument. Please, use 'Lat' instead.")
if (missing(Lat)) {
Lat <- LatRad
}
}
# if (!missing(LatRad)) {
# warning("Deprecated 'LatRad' argument. Please, use 'Lat' instead.")
# if (missing(Lat)) {
# Lat <- LatRad
# }
# }
if (!(inherits(JD, "numeric") | inherits(JD, "integer"))) {
stop("'JD' must be of class 'numeric'")
}
......@@ -126,10 +126,10 @@ PE_Oudin <- function(JD, Temp,
## ---------- disaggregate PE from daily to 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.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))
}
......
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