Commit f6bf5f48 authored by François Bourgin's avatar François Bourgin Committed by fbourgin
Browse files

UPDATE: ETP Oudin daily in Fortran

parent 83bf349f
PEdaily_Oudin <- function(JD, Temp, LatRad, Lat, LatUnit = c("rad", "deg")) {
PEdaily_Oudin <- function(JD, Temp, LatRad, Lat, LatUnit = c("rad", "deg"), run_fortran = F) {
## ---------- deprecated function
......@@ -49,14 +49,14 @@ PEdaily_Oudin <- function(JD, Temp, LatRad, Lat, LatUnit = c("rad", "deg")) {
## ---------- Oudin's formula
run_fortran = T
if (run_fortran)
{
if (LatUnit[1L] == "rad") {
Lat = Lat * 180 / pi
}
LInputs = as.integer(length(Temp))
RESULTS <- .Fortran("frun_etp_oudin", PACKAGE="airGR",
##inputs
LInputs = LInputs,
......@@ -66,6 +66,7 @@ PEdaily_Oudin <- function(JD, Temp, LatRad, Lat, LatUnit = c("rad", "deg")) {
##outputs
PE_Oudin_D = rep(as.double(-999.999), LInputs)
)
PE_Oudin_D = RESULTS$PE_Oudin_D
} else {
PE_Oudin_D <- rep(NA, length(Temp))
......
......@@ -28,7 +28,6 @@
DO k=1,LInputs
tt = InputsTT(k)
jj = InputsJJ(k)
ETPoud = -99.9
!model run on one time step
CALL ETP_OUDIN(FI,tt,jj,ETPoud)
!storage of outputs
......
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