Learn R Programming

scenfire (version 0.1.0)

check_fire_data: Check Consistency of Historical vs. Simulated Fire Data

Description

This function compares historical fire sizes with simulated fire sizes to assess whether the simulations are sufficient in terms of maximum burned area and total burned area. If the simulated fires are not adequate, the function prints guidance messages suggesting additional simulations or adjustments.

Usage

check_fire_data(fires_hist_size, sim_perimeters_size, n_years)

Value

If the simulated fires are sufficient, returns an integer representing the recommended surface threshold (in number of seasons). If the simulations are not sufficient, prints diagnostic messages and returns nothing.

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 represented in the simulation.

Details

The function checks:

  • Maximum fire size in historical vs. simulated data.

  • Total burned area in historical vs. simulated data.

If both criteria are satisfied, it calculates a recommended threshold using get_select_params.

See Also

get_select_params

Examples

Run this code
# Example with toy data
set.seed(123)
hist_sizes <- rgamma(100, shape = 2, scale = 5)
sim_sizes  <- rgamma(200, shape = 2, scale = 4)

check_fire_data(fires_hist_size = hist_sizes,
                sim_perimeters_size = sim_sizes,
                n_years = 10)

Run the code above in your browser using DataLab