<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jen Ciarochi</title>
    <description>The latest articles on DEV Community by Jen Ciarochi (@jenciarochi).</description>
    <link>https://dev.to/jenciarochi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F436594%2F79aff229-9808-4a73-90b9-571d7792034c.jpg</url>
      <title>DEV Community: Jen Ciarochi</title>
      <link>https://dev.to/jenciarochi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jenciarochi"/>
    <language>en</language>
    <item>
      <title>The history of wildfire modeling</title>
      <dc:creator>Jen Ciarochi</dc:creator>
      <pubDate>Wed, 28 Oct 2020 21:00:35 +0000</pubDate>
      <link>https://dev.to/jenciarochi/the-history-of-wildfire-modeling-5anl</link>
      <guid>https://dev.to/jenciarochi/the-history-of-wildfire-modeling-5anl</guid>
      <description>&lt;p&gt;What are the origins of fire modeling? Who actually runs fire models today? Why aren’t fire models as impactful as weather models, and will they ever get there? &lt;em&gt;This article was originally published on &lt;a href="https://triplebyte.com/blog/the-history-of-wildfire-modeling?ref=devto" rel="noopener noreferrer"&gt;Triplebyte's Compiler blog&lt;/a&gt;&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Fire modeling was born in the 1940s, against the backdrop of World War II, the looming Cold War, and a fire-phobic Forest Service&lt;/em&gt;&lt;/strong&gt;. The pioneer of fire modeling was a mechanical engineer named Wallace Fons, who built wind tunnels and crib fires to study the behavior and properties of fire.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3kjyl5r53fdxlzpgrr3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3kjyl5r53fdxlzpgrr3a.png" alt="WindTunnelCribFirCeComp"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Left: a wind tunnel Fons built for his study, “Analysis of fire spread in light forest fuels”; Right: a crib fire, a 3D grid of sticks with different thicknesses and densities. Image from Fons et al. “Project Fire Model: Summary Progress Report - II.”
&lt;/h6&gt;


&lt;p&gt;&lt;br&gt;
Fons noted that fire spreads by successively heating neighboring fuel particles up to ignition temperature. He reasoned that the rate of fire spread is largely controlled by how long it takes fire to ignite the type of fuel as well as how far apart the fuel particles are.&lt;/p&gt;

&lt;p&gt;In 1946, Fons published the first mathematical model of wildfire spread. The model applied the energy conservation equation to a uniform fuel bed exposed to fire, and found a logarithmic relationship between the rate of fire spread and the temperature of the fuel bed. Despite the model’s flaws (it linearized the contribution of radiation, i.e., ignored the fourth power of temperature in the radiation heat transfer equations), it was validated by experiments with pine needles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqmjzyllvuj74fcuqnogw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqmjzyllvuj74fcuqnogw.png" alt="FirstFireModelComp"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
Like most other accomplished fire scientists in the country at the time, Fons worked for the Forest Service—which was and is part of the United States Department of Agriculture (USDA). Since its establishment in 1905, the Forest Service had essentially become a hegemon, and was waging a well-documented “war on fire.” &lt;/p&gt;

&lt;p&gt;The Forest Service controlled fire science, with the singular goal of suppressing wildfires; whether that goal was also the motivation behind the first fire model isn’t totally clear, but it undoubtedly played a role in the agency’s decision to employ Fons.&lt;/p&gt;

&lt;p&gt;The birth of fire modeling coincided with the end of WWII, at which point the focus of fire research had shifted from suppressing fire to weaponizing it. &lt;/p&gt;

&lt;p&gt;After the war, authorities were convinced that the next war would also be a fire war, and it’s pretty easy to understand why. Japan had launched bomb-carrying hydrogen balloons (called Fu-Gos, or “fire balloons”) into the US in an attempt to start wildfires. While the launch was largely unsuccessful, it was the longest-range attack the world had ever seen. Then, there were the firestorms—massive, bomb-induced fires that created hurricane-level winds. After allied forces bombed Dresden, Hamburg, and Tokyo, unexpected firestorms raged in the cities. The Hiroshima atomic strike produced yet another firestorm, which destroyed over four square miles. &lt;/p&gt;

&lt;p&gt;Recognizing the need to understand fire, the federal government began investing heavily in multidisciplinary fire research and large-scale field experiments—and continued to do so through much of the Cold War. The Forest Service became actively involved in nuclear blast tests, employing the country’s best fire scientists. While the US didn’t release another major fire model until the 1960s, the war-inspired boost to fire research uncovered fundamental knowledge about fire that formed the basis of future fire models. &lt;/p&gt;

&lt;p&gt;Fons himself, who worked for the Forest Service until his death in 1963, was involved in several classified experiments studying the impact of detonation-induced fires on forests and other materials. &lt;/p&gt;

&lt;p&gt;One of these experiments, part of Operation Tumbler-Snapper, explored whether trees can provide safety from a nuclear blast. To measure how trees bend or break under shockwave forces, Fons drove trees around at fixed speeds in the bed of a specially-equipped truck. The Forest Service extended this work to study blast effects on an artificial pine forest they set up in Nevada. &lt;a href="https://www.youtube.com/watch?v=JaefRdulTk0" rel="noopener noreferrer"&gt;A video of this experiment&lt;/a&gt; (around 32:05) shows several men who all seem to be able to singlehandedly lift AN ENTIRE TREE...until you notice the crane in the corner later in the video. &lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F50d151v9vsbzgh8wpph0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F50d151v9vsbzgh8wpph0.png" alt="ManLiftingTreeComp"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
Can we also pause to appreciate the irony of these incredibly smoky film transitions?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feafa6hkfkgou50h3uyeh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feafa6hkfkgou50h3uyeh.png" alt="SmokeyBook"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
Anyway, the first fire modeler was apparently also an asset to national defense; in 1961, then Vice President Lyndon Johnson presented Fons with the USDA Superior Service Award for “notable pioneering contributions to forest fire research and to national defense including the establishment of the thermal and blast effects of nuclear explosions on forests and other natural cover.” &lt;/p&gt;

&lt;p&gt;Some of the Forest Service’s other fire-related initiatives during this time were less fruitful. For example, they launched Project Skyfire in 1953 with the goal of preventing fires by modifying weather. Specifically, researchers tried to suppress lightning by seeding thunderstorms with silver iodide. &lt;/p&gt;

&lt;p&gt;In the 1960s and 1970s, several countries released new fire models, with the US, Australia, Russia, and Canada leading these efforts. Like Fons’s model, many of the newer models were physical—based on the laws of fluid mechanics, combustion, and heat transfer. &lt;/p&gt;

&lt;p&gt;However, Australia and Russia also released the first empirical (McArthur, 1966) and semi-empirical (Molchenov, 1957) models. This new wave of fire models—based on statistical correlations from experiments or historical wildfire studies—was made possible by the experiments and data-gathering of the previous decades. &lt;/p&gt;

&lt;p&gt;One of the most influential fire models was Dick Rothermel’s semi-empirical model of forward fire spread, published in 1972. Rothermel was an aeronautical engineer turned USDA fire modeler. His fire spread model was based on Frandsen’s 1971 heat balance model as well as data from wind tunnel experiments and Australian wildfires. The model calculates the rate of forward fire spread by dividing heat source by heat sink:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe726ftj0fsaynlmrpzhr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe726ftj0fsaynlmrpzhr.png" alt="Req1Comp"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt; &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0fk1o5txx3tqcfxwr14j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0fk1o5txx3tqcfxwr14j.png" alt="RothermelComp"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Calculations in Rothermel's basic surface fire spread model. Reference: &lt;a href="https://www.fs.fed.us/rm/pubs_series/rmrs/gtr/rmrs_gtr371.pdf" rel="noopener noreferrer"&gt;USDA&lt;/a&gt;.
&lt;/h6&gt;


&lt;p&gt;&lt;br&gt;
The Rothermel equations were suitable for so many wildfires that the Forest Service implemented them in the first release of the National Fire Danger Rating System (NFDRS), which initially consisted of lookup tables and nomograms. Using paper and pencil, firefighters manually plugged in the wind and slope angle to estimate the speed and direction of fire spread.&lt;/p&gt;

&lt;p&gt;Today, the NFDRS is computerized, but still based on Rothermel’s equations. Many other prominent fire modeling software packages, like BehavePlus and FARSITE, also implement Rothermel’s groundbreaking model.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fka7ebnvsw0oha4aaam9x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fka7ebnvsw0oha4aaam9x.png" alt="FireDangerThenNoCwComp"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Left: early fire danger rating system, from the 1978 National Fire-Danger Rating System: Technical Documentation; Right: recent forecast from &lt;a href="https://m.wfas.net" rel="noopener noreferrer"&gt;WFAS&lt;/a&gt; - Severe Fire Danger Mapping System.
&lt;/h6&gt;


&lt;p&gt; &lt;br&gt;
Another fire modeling breakthrough of the 1970s was the use of Huygens principle of wave propagation to model fire spread in all directions. Huygens principle, originally proposed to describe traveling lightwaves, treats each point on the edge of a wave-front as an independent source of secondary wavelets that propagate the wave. &lt;/p&gt;

&lt;p&gt;Applied to fire modeling, Huygens principle simulates fire spread using wavelets (typically elliptical wavelets). At each time point, the wind-slope vector determines the shape and orientation of each ellipse, while the fuel conditions determine their size (spread rate). The wavelets form a kind of envelope around the original fire perimeter, and the outer edge of this envelope is the new fire front.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb9xooxskoh5x8xbgrob4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb9xooxskoh5x8xbgrob4.png" alt="HuygensPrinciple"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Huygen’s principle applied to fire propagation, with uniform wind from the southwest (reference: &lt;a href="http://fire.org/downloads/farsite/WebHelp/technicalreferences/tech_modeling_fire_growth.htm" rel="noopener noreferrer"&gt;FARSITE&lt;/a&gt;). A) Fire spread across a landscape with uniform fuel type; B) Fire spread across a landscape with four different fuel types.
&lt;/h6&gt;


&lt;p&gt;&lt;br&gt;
Sanderlin and Sunderson were the first to apply Huygens principle to fire modeling. Their computerized “radial fire propagation model,” published in 1975, projected fire growth using a three-dimensional wind field and a gridded fuel and topography landscape. Shortly after, in 1982, Hal Anderson at the Missoula Fire Sciences Laboratory applied Huygens principle to perimeter data from a test fire. To this day, Huygens principle is one of the two most common methods for propagating fire (the other method spreads the fire based on direct contact with, or close proximity to, neighboring cells).&lt;/p&gt;

&lt;p&gt;While fire modeling was making a comeback, the Forest Service was eating humble pie. Other federal agencies had grown weary of the Forest Service’s monopoly on fire science, and were eager to implement their own policies. The National Park Service, the Department of the Interior, and the National Science Foundation all became involved in fire research. At the same time, the Forest Service’s funding from the defense department, which had been flowing in steadily since the end of WWII, started to dry up. &lt;/p&gt;

&lt;p&gt;With this shift in fire research came a pivot in the attitude toward prescribed burning (setting intentional fires), which had been gradually reemerging as a forest management strategy since the 1940s. Wildfires, once viewed as nothing more than a threat to life and valuable forest resources, were increasingly being recognized as a vital part of the earth system.&lt;/p&gt;

&lt;p&gt;As this funding-fueled frenzy of fire research came to a close, many questions about fire physics and chemistry were left unresolved. Nonetheless, the impending era of computers greatly advanced fire modeling in the decades that followed.&lt;/p&gt;

&lt;p&gt;Before computers, people forecasted fire growth using physical maps, nomograms, spread rate calculations, and vectors of slope and wind effects. With the advent of computers came computerized fire simulation models, which converted the existing 1D point models of forward fire spread into 2D planar models that propagate the whole fire perimeter across a landscape. The Forest Service released the first wildland fire behavior prediction program—called Behave—in 1984. Behave was based on the Rothermel equations and initially programmed on a TI-59 calculator.&lt;/p&gt;

&lt;p&gt;A lack of fuel and terrain data, however, severely limited early fire spread software. In the 1990s, remote sensing capabilities, Geographical Information Systems (GIS), and greater computing power revived interest in fire behavior modeling. Behave and other fire modeling software packages were integrated with GIS, bringing landscape data into fire simulation. &lt;/p&gt;

&lt;p&gt;In the 90s and early aughts, researchers released several new GIS-based fire simulators. Notable examples in the US included Dynafire (1991), Firemap (1992), FARSITE (1993), Burn (1994), and Embyr (2000). With the exception of Embyr, each of these models was based on the Rothermel equations.&lt;/p&gt;

&lt;p&gt;In 1996, Garcia Vega and other Forest Service researchers published the first application of machine learning to wildfire modeling. They used an artificial neural network, trained and tested on historical wildfire data, to predict human-caused wildfires in Alberta, Canada. Using the weather index, regional size, and district as input data, their model correctly predicted where fires wouldn’t occur 85% of the time and where they would occur 78% of the time.&lt;/p&gt;

&lt;p&gt;It was also in 1996 that National Science Foundation researcher Terry Clark showed that fire spread models could be coupled with numerical atmospheric models. This coupling allowed fire to interact with the atmosphere and “create its own weather” in simulations, as it does in the real world. The atmospheric humidity, temperature, wind speed, and wind direction affect the fire environment, while the smoke, heat fluxes, and moisture fluxes from the fire influence the atmosphere.&lt;/p&gt;

&lt;p&gt;Clark’s model—called CAWFE—ushered in a new generation of coupled fire-atmosphere models that fall largely into one of two camps. The first camp, exemplified by CAWFE and WRF-SFIRE, pairs a simplified empirical fire spread model with a 3D numerical weather prediction model (with a resolution of hundreds of meters or more).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnkfjsja4lyaj7leyb51q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnkfjsja4lyaj7leyb51q.png" alt="WRFsFIREComp"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Information flow of the coupled fire-atmosphere model WRF-SFIRE.
&lt;/h6&gt;


&lt;p&gt;&lt;br&gt;
The second camp of coupled fire-atmosphere models includes models like the Wildland-Urban Interface Fire Dynamic Simulator (WFDS) and HIGRAD/FIRETEC. These programs pair fire models with a computational fluid dynamics (CFD) model, simulating turbulent airflow at a very high resolution (single meters) over a relatively small area. &lt;/p&gt;

&lt;p&gt;This brings you pretty much up to speed on the history of fire modeling in the US, but where does the field stand today?&lt;/p&gt;

&lt;h2&gt;
  
  
  Fire modeling today
&lt;/h2&gt;

&lt;p&gt;In this final section, I address some of the most interesting questions about fire modeling today.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who actually runs fire models?&lt;/li&gt;
&lt;li&gt;How are fire models used for real firefighting?&lt;/li&gt;
&lt;li&gt;Why aren’t fire models better, and how can they improve? &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Who actually runs fire models?
&lt;/h3&gt;

&lt;p&gt;Spoiler alert: it’s not firefighters. The US manages wildfire responses through the Incident Command System, an interdepartmental effort that was established in the 1970s after devastating California wildfires. Under this system, a Fire Analyst (or Fire Behavior Analyst) runs a fire model and relays the highlights of the model output to the Incident Commander (IC). &lt;/p&gt;

&lt;p&gt;The IC coordinates an emergency response based on many streams of information, one of which is the fire model output. In addition to the model, the IC must also consider where crews are and whether they are safe, which structures are the most at-risk, how the fire can be accessed, where the nearest water sources are, what the weather is like, what type of terrain they’re dealing with, and so on. The IC uses all this information to make quick decisions about where resources should be focused and what crews on the ground should do.&lt;br&gt;
&lt;/p&gt;


&lt;h3&gt;
  
  
  How are fire models used for real firefighting?
&lt;/h3&gt;

&lt;p&gt;Firefighting organizations in the US use several types of fire models for real-world wildfire management, with notable examples including FARSITE (Flammap) and the Wildland Fire Decision Support System (WFDSS)—built in 2009. All fires under federal government jurisdiction are run through WFDSS.&lt;/p&gt;

&lt;p&gt;That being said, we still suppress 97% of the wildfires in the US (it’s the other 3% that cause all the devastation in the news). Since modeling a fire that won’t spread is futile, analysts only model about 1% of wildfires (and 3% of those on federal lands). As such, the most common application of fire model output by far is staging—deciding where to move firefighting resources based on where wildfires are most likely to occur.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpuy7l8x75blkdurlkkf2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpuy7l8x75blkdurlkkf2.png" alt="Screen Shot 2020-10-27 at 6.51.46 PM"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
When it comes to modeling ongoing wildfires in real time (rather than predicting where they will start), most operational fire models are pretty basic and rely on simple input data. All of these systems use empirical 1D fire spread models, which are faster and less complex than their physical counterparts. As computers get faster and more powerful, physical models are increasingly being incorporated into fire spread simulations. Some of the more complex models, like the coupled fire-atmosphere model WRF-SFIRE, are already fast enough for real-time use!&lt;/p&gt;

&lt;p&gt;Wildfire management teams are also leveraging AI-based tools. For example, the California Department of Forestry and Fire Protection (CalFire) is using Wildfire Analyst Enterprise—developed by the startup Technosylva—to predict wildfire behavior. Wildfire Analyst Enterprise uses fire spread models and machine learning to compare current and historical fires, then uses this information to predict where a fire will go and when it will get there. &lt;/p&gt;

&lt;p&gt;At the end of August, CalFire Battalion Chief Jon Heggie sent firefighters and equipment to Felton, California after the Wildfire Analyst Enterprise predicted that the CZU Lightning Complex fire would spread there. They were able to save many homes as a result of the early intervention.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why aren’t fire models better, and how can they improve?
&lt;/h3&gt;

&lt;p&gt;Right now, the biggest barrier standing in the way of better fire models is a lack of knowledge about the physics and chemistry of fire—particularly large-scale wildfires.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F749btwemoah7yzlvi45x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F749btwemoah7yzlvi45x.png" alt="BurningQuestionsComp"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Burning questions about fire.
&lt;/h6&gt;


&lt;p&gt;&lt;br&gt;&lt;br&gt;
Ironically, between the excessive fuel buildup from decades of wildfire suppression and the hotter, drier seasons of recent decades, our wildfires are starting to look more and more like the highly unpredictable, bomb-induced fires we studied so intently after WWII. &lt;/p&gt;

&lt;p&gt;Fortunately, the gradual reintegration of prescribed burning as a forest management strategy provides an excellent opportunity to boost fire science and improve fire models. To understand why, consider the closely-related problem of modeling weather. Fire and weather are intimately interlinked, and in many ways, fire modeling is a weather modeling problem. Fire and weather (unlike earthquakes, for example) can both be directly observed. Why, then, has weather modeling outpaced fire modeling?&lt;/p&gt;

&lt;p&gt;Aside from funding, another (closely-related) reason is data. Every day, weather modelers wake up to more weather data, which they can use to help validate their models. The same is not even remotely true for fire modelers. Remember, we still suppress 97% of wildfires in this country, so it’s really difficult for fire modelers to validate their models and gather data at scales relevant to modeling real wildfires. &lt;/p&gt;

&lt;p&gt;For this reason, the historical shift in the prescribed burning policy is really exciting for fire modeling. Prescribed burns are much more similar to real wildfires than fires in laboratory settings, yet much easier to collect data from. After all, we know exactly when, where, and how prescribed burns are starting. Couple this with faster, more powerful computers and better remote sensing technology (e.g., LIDAR), and fire modeling is well-poised to rapidly improve in the near future—IF these efforts are sufficiently funded. &lt;/p&gt;

&lt;p&gt;While scientists and policymakers alike now recognize prescribed burning as the most broadly cost-effective fire management strategy, this paradigm shift has not been accompanied by a commensurate increase in prescribed burning. In the Western US, prescribed burning activity has actually remained stable or even decreased between 1998 and 2018.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkbhtb285z4xle5u6rfa3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkbhtb285z4xle5u6rfa3.png" alt="StateChangePrescribedBurns"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Change in prescribed burning activity between 1998 and 2018 in different regions of the US (reference: &lt;a href="https://www.mdpi.com/2571-6255/2/2/30" rel="noopener noreferrer"&gt;MDPI&lt;/a&gt;).
&lt;/h6&gt;


&lt;p&gt; &lt;br&gt;
In areas that are carrying out more prescribed burns, the federal government isn’t leading the effort; serious wildfires are increasingly forcing federal agencies to devote more of their resources to fire suppression. In the last five years, the Bureau of Indian affairs was the only federal agency that allocated over 25% of its fire suppression budget for prescribed burning; it was also the only federal agency to considerably ramp up prescribed burning activity. In the Southeast, where prescribed burning increased the most, 70% of the burns were led by non-federal organizations.&lt;/p&gt;

&lt;p&gt;To make matters worse, many states canceled planned prescribed burns in 2020 due to COVID-19, out of well-founded concern for how diminished air quality could worsen the pandemic. So, while prescribed burns can improve fire science, which can in turn improve fire models, we aren’t exactly on the right track to get there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F90q8b3rly7zdq4sx8hfl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F90q8b3rly7zdq4sx8hfl.png" alt="LessPBs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Reference: &lt;a href="https://www.sciencemag.org/news/2020/09/covid-19-worries-douse-plans-fire-experiments" rel="noopener noreferrer"&gt;AAAS&lt;/a&gt;
&lt;/h6&gt;


&lt;p&gt;&lt;br&gt;
Fire models, like fires, don’t develop in a vacuum. Like the physical landscape, the political landscape in the United States shapes how Americans deal with—and model—wildfires.&lt;/p&gt;

&lt;p&gt;The 40s and 50s saw the birth of fire modeling and war-driven improvements to fire science. As the Cold War raged on, the 60s and 70s witnessed a flourishing of new fire models. The 80s and 90s brought fire simulators that elevated those 1D models to two dimensions. The 2000s brought coupled fire-atmosphere models, increasingly faster computers, and new AI tools.‍&lt;/p&gt;

&lt;p&gt;What we need now is a better scientific grasp of large-scale wildland fires, and more prescribed burns to help us get there.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  About Triplebyte
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Triplebyte is a one-stop-shop for engineers to showcase their technical skills, analyze their strengths, advance their careers, and get awesome jobs. You can get started &lt;a href="https://triplebyte.com/?ref=devto" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;‍&lt;br&gt;
References&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Andrews, P.L. “The Rothermel surface fire spread model and associated developments: A comprehensive explanation.” 2018.&lt;/li&gt;
&lt;li&gt;“A Century of Wildland Fire Research,” 2017. &lt;a href="https://doi.org/10.17226/24792" rel="noopener noreferrer"&gt;https://doi.org/10.17226/24792&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Duane, Daniel. “The West's Infernos Are Melting Our Sense of How Fire Works.” Wired. 2020. Conde Nast. &lt;a href="https://www.wired.com/story/west-coast-california-wildfire-infernos/" rel="noopener noreferrer"&gt;https://www.wired.com/story/west-coast-california-wildfire-infernos/&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Fons, Wallace L. and T.G. Storey, “Operation Castle, Project 3.3, Blast Effects on Tree Stand: Report to the Test Director.” 1955. WT-921. Washington, DC: USDA Forest Service, Division of Fire Research.&lt;/li&gt;
&lt;li&gt;Fons, Wallace L., Sauer, F.M., and W.Y. Pong, “Blast Effects on Forest Stands by Nuclear Weapons,” Technical Report AFSWP-971 (Washington, DC: USDA Forest Service, Division of Fire Research, 1957). &lt;/li&gt;
&lt;li&gt;Jain, P., Coogan, S., Subramanian, S.G., Crowley, M., Taylor, S., and Mike D. Flannigan. “A Review of Machine Learning Applications in Wildfire Science and Management.” Environmental Reviews, 2020, 1–28. &lt;a href="https://doi.org/10.1139/er-2020-0019" rel="noopener noreferrer"&gt;https://doi.org/10.1139/er-2020-0019&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Kochanski, A.K., Jenkins, M.A., Mandel, J., Beezley, J.D., Clements, C.B., and S. Krueger. “Evaluation of WRF-SFIRE Performance with Field Observations from the FireFlux Experiment.” Geoscientific Model Development 6, no. 4 (2013): 1109–26. &lt;a href="https://doi.org/10.5194/gmd-6-1109-2013" rel="noopener noreferrer"&gt;https://doi.org/10.5194/gmd-6-1109-2013&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Kolden, Crystal A. “We’re Not Doing Enough Prescribed Fire in the Western United States to Mitigate Wildfire Risk.” Fire 2, no. 2 (2019): 30. &lt;a href="https://doi.org/10.3390/fire2020030" rel="noopener noreferrer"&gt;https://doi.org/10.3390/fire2020030&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Pastor, E. “Mathematical Models and Calculation Systems for the Study of Wildland Fire Behaviour.” Progress in Energy and Combustion Science 29, no. 2 (2003): 139–53. &lt;a href="https://doi.org/10.1016/s0360-1285(03)00017-0" rel="noopener noreferrer"&gt;https://doi.org/10.1016/s0360-1285(03)00017-0&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Sauer, F.M., Arnold, R.K., Fons, W.L., and C.C. Chandler, “Operation UPSHOT-KNOTHOLE, Nevada Proving Grounds, Project 8.11b, Ignition and Persistent Fires Resulting from Atomic Explosions—Exterior Kindling Fuels: Report to the Test Director.” 1953. WT-775. Washington, DC: USDA Forest Service, Division of Fire Research. &lt;/li&gt;
&lt;li&gt;Sullivan, Andrew L. “Wildland Surface Fire Spread Modelling, 1990 - 2007. 3: Simulation and Mathematical Analogue Models.” International Journal of Wildland Fire 18, no. 4 (2009): 387. &lt;a href="https://doi.org/10.1071/wf06144" rel="noopener noreferrer"&gt;https://doi.org/10.1071/wf06144&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Sullivan, Andrew L. “Wildland Surface Fire Spread Modelling, 1990 - 2007. 1: Physical and Quasi-Physical Models.” International Journal of Wildland Fire 18, no. 4 (2009): 349. &lt;a href="https://doi.org/10.1071/wf06143" rel="noopener noreferrer"&gt;https://doi.org/10.1071/wf06143&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Sullivan, Andrew L. “Wildland Surface Fire Spread Modelling, 1990 - 2007. 2: Empirical and Quasi-Empirical Models.” International Journal of Wildland Fire 18, no. 4 (2009): 369. &lt;a href="https://doi.org/10.1071/wf06142" rel="noopener noreferrer"&gt;https://doi.org/10.1071/wf06142&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;"United States Strategic Bombing Survey: The Effects of the Atomic Bombs on Hiroshima and Nagasaki.” June 30, 1946&lt;/li&gt;
&lt;li&gt;Weise, D.R. and T.R. Fons. “Wallace L. Fons: Fire Research Pioneer.” 2014. Forest History Today.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>history</category>
      <category>watercooler</category>
      <category>learning</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>How Fire Spreads: Mathematical Models and Simulators</title>
      <dc:creator>Jen Ciarochi</dc:creator>
      <pubDate>Tue, 28 Jul 2020 14:06:07 +0000</pubDate>
      <link>https://dev.to/triplebyte/how-fire-spreads-mathematical-models-and-simulators-395c</link>
      <guid>https://dev.to/triplebyte/how-fire-spreads-mathematical-models-and-simulators-395c</guid>
      <description>&lt;p&gt;Summary: This article explains how to build and modify a simple fire model, and explores two popular methods to simulate fire spread—cellular automata and wave propagation. &lt;em&gt;This article was originally published on &lt;a href="https://triplebyte.com/blog/how-fire-spreads-mathematical-models-and-simulators?ref=devto"&gt;Triplebyte's blog&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  It’s Fire Season
&lt;/h2&gt;

&lt;p&gt;In July, the Western United States enters the core of the fire season. Many parts of the country are experiencing below-average precipitation and above-average temperatures—creating hot, dry conditions that are ideal for wildfires.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yoZViUSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fjt8gz8dnios1egi3yvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yoZViUSu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fjt8gz8dnios1egi3yvt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;NOAA Regional Climate Centers: Generated at HPRCC using provisional data&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Mathematical models of fire behavior, and the calculation systems based on them, are an important part of fire mitigation. Fire models can help determine where a fire is likely to start, how quickly it will spread (and in what direction), and how much heat it will generate; these important clues can save lives and substantially curb financial losses.&lt;br&gt;
     &lt;/p&gt;

&lt;h2&gt;
  
  
  Modeling Fire Growth: Cellular Automata
&lt;/h2&gt;

&lt;p&gt;A simple cellular automaton forest fire model consists of a grid of cells, and each cell can be in one of three states:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M29Yp3Tb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eannttzt4slz0ny5t4c6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M29Yp3Tb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eannttzt4slz0ny5t4c6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At each time step, the state of each cell on the grid is determined by four rules that the model carries out simultaneously:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f2BXRT6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cefh2jg2w4chaqcr6ylh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f2BXRT6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cefh2jg2w4chaqcr6ylh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;     &lt;/p&gt;

&lt;h3&gt;
  
  
  A Cellular Forest Fire Model in Python
&lt;/h3&gt;

&lt;p&gt;These four fire model rules are implemented by the iterate function of a cellular automaton model created by Christian Hill&lt;a href="https://scipython.com/blog/the-forest-fire-model/"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hWJYtiE6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/98m738qd4cbt1b3npcs6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hWJYtiE6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/98m738qd4cbt1b3npcs6.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# This function iterates the forest fire model according to the 4 fire model rules.
# X is the current state of the forest and X1 is the future state. 
def iterate(X):
    
    # RULE 1 ("A burning cell becomes an empty cell") is handled by 
    # setting X1 to 0 initially and having no rules that update FIRE cells. 
    X1 = np.zeros((ny, nx))
    for ix in range(1,nx-1):
         for iy in range(1,ny-1):
            
            # RULE 4 ("An empty cell becomes a cell with a tree at probability p") 
            if X[iy,ix] == EMPTY and np.random.random() &amp;lt;= p:
                 X1[iy,ix] = TREE
                 
            # RULE 2 ("A cell with a tree becomes a burning cell if at least one 
            # of its neighbors is a burning cell.")
            if X[iy,ix] == TREE:
                 X1[iy,ix] = TREE
                 for dx,dy in neighborhood:
                     if X[iy+dy,ix+dx] == FIRE:
                         X1[iy,ix] = FIRE
                         break
                         
                 # RULE 3 ("A cell with a tree ignites at probability f even if 
                 # none of its neighbors are burning").
                 else:
                     if np.random.random() &amp;lt;= f:
                         X1[iy,ix] = FIRE
         return X1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Modifying the Model
&lt;/h3&gt;

&lt;p&gt;Some simple modifications to the code can add other features to the model that influence fire spread. For example, to add water bodies—which can block fire spread, I first defined a new cell state (WATER) and expanded the color list and bounds accordingly:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
EMPTY, TREE, FIRE, WATER = 0, 1, 2, 3
colors_list = [(0.2,0,0), (0,0.5,0), (1,0,0), 'orange', 'blue']
cmap = colors.ListedColormap(colors_list)
bounds = [0,1,2,3,4]
norm = colors.BoundaryNorm(bounds, cmap.N)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; &lt;br&gt;&lt;br&gt;
Then, I added another rule to the iterate function, which simply ensures that WATER cells remain WATER cells.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def iterate(X):
    X1 = np.zeros((ny, nx))
    for ix in range(1,nx-1):
         for iy in range(1,ny-1):
            if X[iy,ix] == WATER:
                 X1[iy,ix] = WATER
            if X[iy,ix] == EMPTY and np.random.random() &amp;lt;= p:
                 X1[iy,ix] = TREE
            if X[iy,ix] == TREE:
                 X1[iy,ix] = TREE                 
                 for dx,dy in neighborhood:
                     if X[iy+dy,ix+dx] == FIRE:
                         X1[iy,ix] = FIRE
                         break
                 else:
                     if np.random.random() &amp;lt;= f:
                         X1[iy,ix] = FIRE
         return X1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; &lt;br&gt;&lt;br&gt;
Finally, I defined the boundaries of the water bodies (in this case, four vertical “streams”).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;X[10:90, 10:15] = WATER
X[10:90, 40:45] = WATER
X[10:90, 60:65] = WATER
X[10:90, 80:85] = WATER
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; &lt;br&gt;&lt;br&gt;
These adjustments produce a model that shows how fire growth is restricted by water:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xJIEcpk1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zg5p44eqvsa8kly9cupq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xJIEcpk1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zg5p44eqvsa8kly9cupq.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notably, fire can sometimes “jump” over barriers—a behavior called spotting that creates trouble for fire modelers and responders alike.&lt;br&gt;
 &lt;br&gt;&lt;br&gt;
The original model can also be modified to include wind, which can dramatically affect fire spread. To achieve this, I first modified the original neighborhood (commented out below), such that NY and NX respectively represent the first and second coordinates of the original neighborhood.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
# neighborhood = ((-1,-1), (-1,0), (-1,1), (0,-1), (0, 1), (1,-1), (1,0), (1,1))
# NY and NX are now neighborhood
NY=([-1,-1,-1,0,0,1,1,1])
NX=([-1,0,1,-1,1,-1,0,1])
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; &lt;br&gt;&lt;br&gt;
Just below NY and NX, I defined NZ, which represents wind. Each value in NZ corresponds to one of the coordinates in neighborhood (NY and NX). If at least one of the index values in a neighbor-specifying pair of NY, NX is negative, the corresponding NZ value is 0.1. Otherwise, NZ is 1. As a concrete example, the first value of both NY and NX is -1, so this first pair of coordinates corresponds to the neighbor at (-1,-1). Thus, the NZ value corresponding to this pair is 0.1. This modification ends up biasing fire spread in the direction that wind is blowing, as I explain shortly.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NZ=([.1,.1,.1,.1,1,.1,1,1])
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt; &lt;br&gt;&lt;br&gt;
The final step is to modify the iterate function to check all neighboring cells. If a neighbor is on fire AND a randomly generated number is less than the neighbor's NZ value (0.1 or 1), the cell catches on fire. Since the random number is a float &amp;gt;0 and &amp;lt;1, when NZ = 1, the random number will always be smaller and the cell will burn. Similarly, 0.1 is below most random numbers generated. This biases fire spread with wind direction. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def iterate(X):
    X1 = np.zeros((ny, nx))
    for ix in range(1,nx-1):
         for iy in range(1,ny-1):
            if X[iy,ix] == EMPTY and np.random.random() &amp;lt;= p:
                 X1[iy,ix] = TREE
            if X[iy,ix] == TREE:
                 X1[iy,ix] = TREE
                 # Check all neighboring cells.
                 for i in range(0,7):
                    # Bias fire spread in the direction of wind.
                    if X[iy+NY[i],ix+NX[i]] == FIRE and np.random.random()&amp;lt;=NZ[i]:
                        X1[iy,ix] = FIRE                 
                         break
                 else:
                     if np.random.random() &amp;lt;= f:
                         X1[iy,ix] = FIRE
         return X1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This example code produces a fire model with wind blowing uniformly from the southeast.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bTNJ0Pog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oyuz4o5gjaac512hi33i.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bTNJ0Pog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/oyuz4o5gjaac512hi33i.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Modeling Fire Growth: Wave Propagation
&lt;/h2&gt;

&lt;p&gt;Cellular models, like the one depicted above, simulate fire spread as a contagion process in which fire spreads between cells. One of the major shortcomings of this method is that the use of a gridded landscape distorts fire geometry, although there are methods to help mitigate this (e.g., increasing the number of neighbor cells).&lt;/p&gt;

&lt;p&gt;Today, some of the most widely used fire simulators (e.g., FARSITE, Prometheus) are based on Huygens principle of wave propagation. Huygens principle was originally proposed to describe traveling light waves, and also explains how sound waves can travel around corners. The crux of Huygens principle is that every point on the edge of a wave-front can be an independent source of secondary wavelets that propagate (i.e., spread) the wave.&lt;/p&gt;

&lt;p&gt;Although Huygens studied light (not sound) and never married, this is what I imagine: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lEZnO6UU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1tfy1kgb91o3nt4kcr9l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lEZnO6UU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1tfy1kgb91o3nt4kcr9l.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wave propagation models simulate fire as an elliptical wave that spreads via smaller secondary elliptical fire wavelets on the fire front. At each time step, the model uses information about the fire environment to define the shape, direction, and size (spread rate) of each wavelet. Shape and direction are determined by the wind-slope vector, while size is determined by fuel conditions.&lt;/p&gt;

&lt;p&gt;The new wave-front is the surface tangential to all the secondary wavelets. In other words, the small ellipses form a kind of envelope around the original fire perimeter, and the outer edge of this envelope is the new fire front.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aLEn_CDT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q6ypuht85nod1cfpgutm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aLEn_CDT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q6ypuht85nod1cfpgutm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Huygen’s principle in the context of fire spread&lt;a href="http://fire.org/downloads/farsite/WebHelp/technicalreferences/tech_modeling_fire_growth.htm"&gt;&lt;sup&gt;2&lt;/sup&gt;&lt;/a&gt;. Wind is uniform and traveling from the southwest. A) Fire spread across a landscape with homogeneous fuel sources. B) Fire spread across a mosaic landscape with four different fuel types and wind speeds, which change the size and shape of the wavelets&lt;/em&gt;.&lt;br&gt;
 &lt;/p&gt;

&lt;h2&gt;
  
  
  Yes, Fire Modeling Is Considerably More Complicated Than This
&lt;/h2&gt;

&lt;p&gt;While cellular automaton and wave propagation models are an essential part of many fire growth simulators, in real-world applications, they become a relatively minor component of a complex simulation process that also incorporates many other models.&lt;/p&gt;

&lt;p&gt;These additional models capture factors related to weather, fuel type (fuel is anything that can burn), and topography, which greatly influence fire growth. Additionally, “fires create their own weather,” altering humidity and other aspects of their surrounding environment; this poses a formidable challenge for fire modelers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qlfFX36E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/98d6isrdyr8v5sb6tleh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qlfFX36E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/98d6isrdyr8v5sb6tleh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Select examples of weather- and topography-related factors that influence fire growth. These variables are often incorporated in fire growth simulators&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Consider FARSITE (now part of the FlamMap fire mapping and analysis system)—a prominent fire simulator used by the U.S. Forest Service, the National Park Service, and other state and federal agencies.&lt;/p&gt;

&lt;p&gt;FARSITE implements Huygens principle using a set of differential equations developed by G.D. Richards in 1990. However, as the table below illustrates, FARSITE also incorporates many other models—as well as several geospatial data layers—to simulate fire growth. Richards’s equations are only used for a single step of the surface fire calculations and a single step of the crown fire calculations.&lt;br&gt;
 &lt;br&gt;
&lt;strong&gt;Models and Geospatial Data Layers Used by FlamMap/FARSITE&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;Model&lt;/th&gt;
    &lt;th&gt;Geospatial data layers for landscape&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Surface fire spread (Rothermel, 1972)&lt;/td&gt;
    &lt;td&gt;Topographic (elevation, slope, aspect)&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Crown fire initiation (Van Wagner, 1977)&lt;/td&gt;
    &lt;td&gt;Fire behavior fuel models&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Crown fire spread (Rothermel, 1991)&lt;/td&gt;
    &lt;td&gt;Forest canopy cover&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;Spotting (Albini, 1979)&lt;/td&gt;
    &lt;td&gt;Forest canopy height&lt;/td&gt;
  &lt;/tr&gt;
 &lt;tr&gt;
    &lt;td&gt;Crown fire calculation (Finney, 1998; Scott and Reinhardt, 2001)&lt;/td&gt;
    &lt;td&gt;Forest canopy base height&lt;/td&gt;
  &lt;/tr&gt;
 &lt;tr&gt;
    &lt;td&gt;Dead fuel moisture (Nelson, 2000)&lt;/td&gt;
    &lt;td&gt;Forest canopy bulk density&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Fire Modeling Is a Balancing Act
&lt;/h2&gt;

&lt;p&gt;Fire modeling requires tradeoffs among accuracy, data availability, and speed. For real-time responses to fire, speed is critical—yet the most physically complex models are impossible to solve faster than real time. As University of Denver researcher Jan Mandel articulated&lt;a href="https://arxiv.org/pdf/0712.3965.pdf"&gt;&lt;sup&gt;3&lt;/sup&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The cost of added physical complexity is a corresponding increase in computational cost, so much so that a full three-dimensional explicit treatment of combustion in wildland fuels by direct numerical simulation (DNS) at scales relevant for atmospheric modeling does not exist, is beyond current supercomputers, and does not currently make sense to do because of the limited skill of weather models at spatial resolution under 1 km.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Notably, there are many types of fire behavior models, and these models can be classified based on the types of equations they use, the variables they study, and the physical systems they represent. For the interested reader, the appendix includes a breakdown of the different model classifications.&lt;br&gt;
 &lt;/p&gt;

&lt;h2&gt;
  
  
  → Coding Challenge
&lt;/h2&gt;

&lt;p&gt;Can you build your own model (e.g., a cellular automaton) to simulate fire spread?&lt;/p&gt;

&lt;p&gt;What additional factors can you add to your model?&lt;/p&gt;

&lt;p&gt;How do you implement them?&lt;/p&gt;

&lt;p&gt;Let me know your thoughts in the comments section!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Triplebyte helps engineers assess and showcase their technical skills and connects them with great opportunities. You can get started &lt;a href="https://triplebyte.com/"&gt;here&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

</description>
      <category>cellularautomaton</category>
      <category>modeling</category>
      <category>python</category>
      <category>matplotlib</category>
    </item>
  </channel>
</rss>
