Learn R Programming

scenfire (version 0.1.0)

get_select_params: Get Selection Parameters for Fire Simulations

Description

This function calculates a selection parameter that represents how many times the simulated burned area covers, on average, the historical annual burned area.

Usage

get_select_params(fires_hist_size, sim_perimeters_size, n_years)

Value

An integer value representing the ratio between the total simulated area and the average annual historical burned area. Larger values indicate that the simulation covers several historical fire seasons.

Arguments

fires_hist_size

Numeric vector of historical fire sizes.

sim_perimeters_size

Numeric vector of simulated fire sizes.

n_years

Integer. Number of years considered in the historical dataset.

Details

The parameter is calculated as: $$ \text{param} = \left\lfloor \frac{\sum(\text{sim\_perimeters\_size})}{\sum(\text{fires\_hist\_size}) / n\_years} \right\rfloor $$

Where:

  • \(\sum(\text{fires\_hist\_size}) / n\_years\) = average historical burned area per year.

  • \(\sum(\text{sim\_perimeters\_size})\) = total simulated burned area.

See Also

[check_fire_data]

Examples

Run this code
# Example with toy data
hist_sizes <- c(100, 200, 150, 300)
sim_sizes  <- c(80, 120, 200, 250, 300)

get_select_params(fires_hist_size = hist_sizes,
                  sim_perimeters_size = sim_sizes,
                  n_years = 4)

Run the code above in your browser using DataLab