Skip to content

pyregence/WesterlingFireModels

Repository files navigation

WesterlingFireModels

This repository contains code (and some data) for producing the Fire Risk Simulation Model (FRSM) and related moddels from the lab of Dr. LeRoy Westerling at the University of California, Merced.

The code is being released under the included LICENSE in the repository. These were developed under a series of grants. It is released AS-IS.

If there are questions or concerns, please raise an Issue in the repository and it will be addressed as the collaborators are able.

Contents

The code is a collection of material used in creating, evaluating, and operationalizing the models. It includes (but isn't limited to) modeling for student work, fire simulation modeling (presence/absence, size, fractions),

The code is mostly R scripts with a few bash shell scripts for automating repetitive tasks (processinig climate data for example). It was written for a Linux system using RStudio and the file paths reflect that. Some of them have been updated to use file.path, but most have been hardcoded.

The file ProcessSteps.txt describes the steps needed to download, process, and generate uncoupled fire lists. It could be converted to a shell script for automation, but some of the steps are one-off while some will be repeated for multiple climate scenarios.

The code framework was designed to have the scripts run from the command line and there is a function (getFromCommandLine) to allow for command line arguments. The examples in ProccessSteps.txt (and Climate/allClimateVar.sh) show how they can be used. There are additional arguments that are not always used and usually default values. Check the individual R scripts for more information. If the scripts are being run through an IDE or sourced from the R command line, a commandLineArgs varaiable can be defined at the beginning of the script to add the arguments. There are various examples of this variable in the code (with them commented out so they don't override the actual command line).

Data Sets

The various data sets and information that needs to be downloaded and processed to work with the fire model.

Boundaries

The collection of shapefiles making up the region of interest (currently just California). Also has the grids (3km, 1km, 30m) used in other aspects of the fire model.

LANDFIRE

Topographic information from LANDFIRE is used in the various models and needs to be converted into other forms from the source 30m grid. Also used for calculated topographic variables used in 30m downscaling.

EPA

EPA eco regions used to group pixels for the LUCAS model coupling.

LUCAS

LUCAS vegetation is used to calibrate the models and generate uncoupled fire lists. A version of the fire modeling was implemented to be usable within the LUCAS simulaton as the implemented fire distrbution module.

MTBS

Also used in calibrating models. Processed with WBSE code to create new fire severity maps for each fire before being used.

Analytics Engine

The base climate data source. Processed in a number of ways to be used for fire and vegetation models. Includes both historical model and projections.

Processing Steps

The processing steps are shown in the ProcessSteps.txt text file. The location for downloading is modified within globals.R as are several other local implementation variables. The set of R libraries used is listed in packageInstall.R. This should probably be run line by line since this is likely to have issues depending on the R version and operating system.

About

Code for most of the sub-projects for the Fire Modeling from the Westerling lab.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •