View source: R/fire_index_functions.r
1 | index_FFDI_G4(Temperature, DewPoint, Wind)
|
Temperature |
|
DewPoint |
|
Wind |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (Temperature, DewPoint, Wind)
{
McA <- 0
McA_list <- c()
llength <- length(Temperature)
for (day in 1:llength) {
satvp <- 6.11 * 10^((7.5 * Temperature[day]/(237.7 +
Temperature[day])))
actvp = 6.11 * 10^((7.5 * DewPoint[day]/(237.7 + DewPoint[day])))
Humid <- (actvp/satvp) * 100
H <- Humid
T <- Temperature[day]
U <- Wind[day]
C = 100
Q = 4.5
F = exp(-1.523 + 1.027 * log(Q) - 0.009432 * (100 - C)^1.535 +
0.02764 * T - 0.2205 * sqrt(H) + 0.6422 * sqrt(U))
McA_list <- append(McA_list, F)
}
McA_list
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.