index_FFDI_G4: McArthur Grassland Fire Index Mk4.

Usage Arguments Examples

View source: R/fire_index_functions.r

Usage

1
index_FFDI_G4(Temperature, DewPoint, Wind)

Arguments

Temperature
DewPoint
Wind

Examples

 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
  }

ozjimbob/ecbtools documentation built on Jan. 18, 2021, 7:39 p.m.