
AOT40v
aot40v.RdCompute the AOT40 for vegetation.
Details
The function computes the accumulated amount of Ozone over the threshold value of 40 ppb (80 µg/m^3) in the time interval between May 1st and July 31st. The computation is performed only between 8:00 and 20:00 (in the timezone of the input data).
At least 90% of valid data are required. In the case not all data are available an estimate is provided as:
$$ \mathrm{AOT40_{estimate}} = \mathrm{AOT40_{measured}} \times \frac{\textrm{Number of possible hours}}{\textrm{Number of measured hours}} $$
Examples
# Build random synthetic dataset for O3.
o3 <- runif(1:8784) * 30
datetime <- seq(lubridate::dmy_hm("1/1/2020 00:00"),
lubridate::dmy_hm("31/12/2020 23:00"),
by = "1 hour")
aot40v <- aot40v(o3, datetime)
if (FALSE) { # \dontrun{
# A data.table with O3 values on a grid:
o3 <- nc_get_variable("path/to/archive.nc", variable = "c_O3")
colnames(o3)
# [1] "time" "y" "x" "c_O3"
aot40v <- o3[, list(aot40v = aot40v(c_O3, time)), by = list(x, y)]
} # }