test-evap.R 546 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
context("Test evaporation")

test_that("PEdaily_Oudin works", {
  skip_on_cran()
  rm(list = ls())
  
  data(L0123001)
  PotEvap <- PEdaily_Oudin(JD = as.POSIXlt(BasinObs$DatesR)$yday + 1,
                           Temp = BasinObs$T,
                           Lat = 0.8, LatUnit = "rad")
  PotEvapFor <- PEdaily_Oudin(JD = as.POSIXlt(BasinObs$DatesR)$yday + 1,
                              Temp = BasinObs$T,
                              Lat = 0.8, LatUnit = "rad", run_fortran = T)
  expect_true(all(range(PotEvap - PotEvapFor) < 0.001))
})