The Fire model

Download Model
Download the .scn, .sel and .lse files by clicking on the following link:

Note that this particular model can be found in the Fire folder under the SimpleFireModel file. For More information, please see SELES FireSuccession Lab Handout in the Handout folder.

Model Code Exploration
In the following sections we will examine all of the model files for this model. Note that instead of downloading the zip file above, you could just copy the text in the boxes below into a text editor and save it with the appropriate name (Section title). Opening the resulting .scn file in the SELES simulator would run this model.

Fire.scn
Seles Model Information initialTimeSinceFire = ..\gisData\cell\initialTSF1 Model Dimensions: initialTimeSinceFire FireModel.sel Minimize Initial State Tile

SimpleFire.scn
Example 1: Scenario Information $gisData$ = "..\..\gisData\cell" StudyArea = $gisData$\lrmp_bnd Elevation = $gisData$\elevation Model Dimensions: StudyArea SimpleFire.sel Minimize StudyArea Minimize DistanceFromSrc Tile // SimStart (100 * 365.25) 1

Example 2: Scenario Information $gisData$ = "..\..\gisData\cell" $outputFiles$ = "..\..\outputFiles" StudyArea = $gisData$\lrmp_bnd Elevation = $gisData$\elevation StandAge = $gisData$\age_prj Model Dimensions: StudyArea SimpleFire.sel // change to output directory and check that gis folders are set up. cwd $outputFiles$ cwd ".\cell" cwd "..\cellhd" cwd ".." Minimize StudyArea Minimize DistanceFromSrc Tile // SimStart (100 * 365.25) 1

Fire.lse
LSEVENT: SimpleFire DEFINITIONS LAYER: TimeSinceFire GLOBAL VARIABLE: ForestSize, MeanFireSize, MeanFiresPerYear, FireCycle, oldFireCycle CLUSTER VARIABLE: Extent ENDDEF RETURNTIME RETURNTIME = 365.25 // In case the user tries to change this... ForestSize = NUMCELLS impliedForestSize = MeanFireSize * MeanFiresPerYear * FireCycle IF (impliedForestSize NEQ ForestSize) // If the user didn't change fire cycle: adjust it. IF oldFireCycle EQ FireCycle oldFireCycle = FireCycle FireCycle = ForestSize / (MeanFireSize * MeanFiresPerYear) DISPLAY RECORD DECISION (oldFireCycle NEQ 0) OR (FireCycle NEQ 0) ForestSize: ForestSize impliedForestSize: impliedForestSize ratio: impliedForestSize/ ForestSize oldFireCycle: oldFireCycle newFireCycle: FireCycle ENDFN oldFireCycle = FireCycle // Otherwise, the fire cycle was changed so adjust num fires instead ELSE oldFireCycle = FireCycle oldMFPY = MeanFiresPerYear MeanFiresPerYear = ForestSize / (MeanFireSize * FireCycle) DISPLAY RECORD ForestSize: ForestSize impliedForestSize: impliedForestSize ratio: impliedForestSize/ ForestSize oldMeanFiresPerYear: oldMFPY newMeanFiresPerYear: MeanFiresPerYear ENDFN ENDFN ENDFN ENDRT // Pick number of fires // with random ignition NUMCLUSTERS NUMCLUSTERS = ROUND(NEGEXP(MeanFiresPerYear)) // For each pick a size Extent = ROUND(NEGEXP(MeanFireSize)) ENDNC TRANSITIONS // Make a transition only if there is still extent to be burned // AND if the stand didn't just burn during this event TRANSITIONS = (Extent >= 1) AND (TimeSinceFire > 0) // Set the time since fire to 0 TimeSinceFire = 0 // Decrement the number of cells remaining to burn for this opening Extent = Extent - 1 ENDTR // Spread time not relevant SPREADTIMESTEP = 0 /* Allow spread to the 4 cardinal neighbours: up, down, left and right */ SPREADLOCATION REGION CENTRED(1,1) DECISION TimeSinceFire > 0 ENDSL NUMSPREADRECIPIENTS /* Mid-Complex shapes. This is the number of neighbours to */ /* spread to from a burning cell. Lower mean gives more complex shapes. */ /* Higher standard deviation gives more variety of shapes. */ NUMSPREADRECIPIENTS = CLAMP(NORMAL(0.5,1), 1,3) ENDNR

SimpleFire.lse
Example 1: LSEVENT: SimpleFire DEFINITIONS LAYER: StudyArea LAYER: TimeSinceFire, DistanceFromSrc LAYER: Elevation GLOBAL VARIABLE: meanFireSize, meanFiresPerYear GLOBAL VARIABLE: SpreadType CLUSTER VARIABLE: burnSize GLOBAL CONSTANT: maxTimeSinceFire CLUSTER VARIABLE: StartLocation CELL VARIABLE: distInc, d ENDDEF INITIALSTATE INITIALSTATE = 1 OVER REGION WHOLE MAP DECISION (StudyArea > 0) TimeSinceFire = maxTimeSinceFire ENDFN ENDIS RETURNTIME RETURNTIME = 365.25 DistanceFromSrc = 2*NUMCELLS ENDRT EVENTLOCATION REGION WHOLE MAP DECISION(StudyArea > 0) ENDEL NUMCLUSTERS NUMCLUSTERS = ROUND(NEGEXP (meanFiresPerYear)) //determine the size of the fire burnSize = ROUND(NEGEXP (meanFireSize)) ENDNC PROBINIT PROBINIT = 1 StartLocation = Location distInc = 0 d = 0 ENDPI TRANSITIONS //TRANSITION IF THE CLUSTER IS LESS THAN burnSize AND IF CELLS HAVE NOT ALREADY BURNED TRANSITIONS = (burnSize >= 1) AND (TimeSinceFire > 10) AND (d < DistanceFromSrc) //SET TIME TO ZERO TimeSinceFire = 0 //DECREASE BURN SIZE BY ONE CELL burnSize = burnSize - 1 DistanceFromSrc = d ENDTR SPREADTIMESTEP SPREADTIMESTEP = distInc ENDST SPREADLOCATION maxD = IF (1 <= SpreadType <= 3) THEN 1.5 ELSE 1 REGION CENTRED(1, maxD) DECISION (DistanceFromSrc > DISTANCE(StartLocation, Location)) ENDSL /* NUMRECIPIENTS NUMRECIPIENTS = 8 // CLAMP(NORMAL(0.5,1), 1,3) ENDNR */ SPREADPROBINIT SPREADPROB = 1 d = ROUND(DISTANCE(StartLocation, Location)) distInc = CLASSIFY(SpreadType) 0: 1              1: 1               2: DISTANCE(Location, SOURCE Location) 3: MAX(0,d - SOURCE DistanceFromSrc) ENDFN ENDSP

Example 2: LSEVENT: SimpleFire DEFINITIONS LAYER: StudyArea LAYER: TimeSinceFire, DistanceFromSrc GLOBAL VARIABLE: meanFireSize, meanFiresPerYear GLOBAL VARIABLE: SpreadType CLUSTER VARIABLE: burnSize CLUSTER VARIABLE: StartLocation CELL VARIABLE: distInc, d GLOBAL CONSTANT: maxTimeSinceFire //Parmeters added to model influence of slope on fire spread rate LAYER: Elevation GLOBAL VARIABLE: uphillBurnRate // multiplier of fire spread rate uphill, versus flat or   downhill //Parameters added for other model features added to v0 LAYER: StandAge GLOBAL VARIABLE: minBurnAge ENDDEF INITIALSTATE INITIALSTATE = 1 OVER REGION WHOLE MAP DECISION (StudyArea > 0) TimeSinceFire = maxTimeSinceFire ENDFN ENDIS RETURNTIME RETURNTIME = 365.25 DistanceFromSrc = 2*NUMCELLS ENDRT EVENTLOCATION REGION WHOLE MAP DECISION(StudyArea > 0) ENDEL NUMCLUSTERS NUMCLUSTERS = meanFiresPerYear //ROUND(NEGEXP (meanFiresPerYear)) //determine the size of the fire burnSize = meanFireSize //ROUND(NEGEXP (meanFireSize)) ENDNC PROBINIT PROBINIT = 1 StartLocation = Location distInc = 0 d = 0 ENDPI TRANSITIONS //TRANSITION IF THE CLUSTER IS LESS THAN burnSize AND IF CELLS HAVE NOT ALREADY BURNED TRANSITIONS = (burnSize >= 1) AND (StandAge >= 10) AND (d < DistanceFromSrc) //SET TIME TO ZERO TimeSinceFire = 0 StandAge = 0 //DECREASE BURN SIZE BY ONE CELL burnSize = burnSize - 1 DistanceFromSrc = d ENDTR SPREADTIMESTEP SPREADTIMESTEP = distInc ENDST SPREADLOCATION maxD = IF (1 <= SpreadType <= 3) THEN 1.5 ELSE 1 REGION CENTRED(1, maxD) DECISION (DistanceFromSrc > DISTANCE(StartLocation, Location)) ENDSL /* NUMRECIPIENTS NUMRECIPIENTS = 8 // CLAMP(NORMAL(0.5,1), 1,3) ENDNR */ SPREADPROBINIT SPREADPROB = 1 d = ROUND(DISTANCE(StartLocation, Location)) distInc = CLASSIFY(SpreadType) 0: 1              1: 1               2: DISTANCE(Location, SOURCE Location) 3: MAX(0,d - SOURCE DistanceFromSrc) ENDFN distInc = IF (SOURCE Elevation < Elevation) THEN (distInc / uphillBurnRate) ELSE distInc ENDSP

Succession.lse
LSEVENT: SimpleAging DEFINITIONS GLOBAL CONSTANT: MaxTSF LAYER: TimeSinceFire ENDDEF // Succession is modelled every year RETURNTIME = 365.25 // Aging simply increments TSF by one year! TRANSITIONS TRANSITIONS = TRUE TimeSinceFire = MIN(TimeSinceFire + 1, MaxTSF) ENDTR

FireModel.sel
Seles Model Information Time Units: Day Year 365.25 Landscape Events: Succession.lse Fire.lse Variable-Input View Maps: TimeSinceFire = initialTimeSinceFire Variable-Output View Maps: TimeSinceFire Global Constants: MaxTSF = 200 Output Model Bounds: TimeSinceFire: MaxTSF Global Variables: ForestSize = 250000 MeanFireSize = 100 MeanFiresPerYear = 10 FireCycle = ForestSize /(MeanFireSize * MeanFiresPerYear) oldFireCycle = FireCycle OFF Output Frequency: 365.250000

SimpleFire.sel
Example 1: Seles Model Time Units: Day Year 365.25 OUTPUT FREQUENCY: 365.25 Landscape Events: SimpleFire.lse DEBUG SimpleAging.lse DEBUG Variable-Input View Maps: StudyArea Elevation StandAge Variable-Output View Maps: TimeSinceFire DistanceFromSrc // in order to output StandAge it is necessary to declare as an output view map. StandAge Global Constants: baseTimeStep = 365.25 maxTimeSinceFire = 250 Output Model Bounds: TimeSinceFire: maxTimeSinceFire DistanceFromSrc: NUMCELLS * 2 StandAge: MAX(StandAge) + 100 Global Variables: meanFireSize = 200 meanFiresPerYear = 5 SpreadType = 1 uphillBurnRate = 2 minBurnAge = 10 Output Model Frequency: // Note that you can only schedule output of variable-output view maps. // Option 1: Schedule output using a specified file name "StandAge" //TimeSinceFire Freq: baseTimeStep * 10 File:".\cell\StandAge" Type: GRASS COMPRESSED Relative // Option 2: Schedule output to a specified directory using the existing layer name TimeSinceFire Freq: baseTimeStep * 10 Directory: ".\cell\" Type: GRASS COMPRESSED Relative StandAge Freq: baseTimeStep * 10 Directory: ".\cell\" Type: GRASS COMPRESSED Relative

Example 2: Seles Model Time Units: Day Year 365.25 OUTPUT FREQUENCY: 365.25 Landscape Events: SimpleFire.lse DEBUG SimpleAging.lse DEBUG Variable-Input View Maps: StudyArea Elevation Variable-Output View Maps: TimeSinceFire DistanceFromSrc Global Constants: maxTimeSinceFire = 250 Output Model Bounds: TimeSinceFire: maxTimeSinceFire DistanceFromSrc: NUMCELLS * 2 Global Variables: meanFireSize = 200 meanFiresPerYear = 5 SpreadType = 1

Example 3: Seles Model Time Units: Day Year 365.25 OUTPUT FREQUENCY: 365.25 Landscape Events: SimpleFire.lse DEBUG SimpleAging.lse DEBUG Variable-Input View Maps: StudyArea Elevation StandAge Variable-Output View Maps: TimeSinceFire DistanceFromSrc // in order to output StandAge it is necessary to declare as an output view map. StandAge Global Constants: baseTimeStep = 365.25 maxTimeSinceFire = 250 Output Model Bounds: TimeSinceFire: maxTimeSinceFire DistanceFromSrc: NUMCELLS * 2 StandAge: MAX(StandAge) + 100 Global Variables: meanFireSize = 200 meanFiresPerYear = 5 SpreadType = 1 uphillBurnRate = 2 minBurnAge = 10 Output Model Frequency: // Note that you can only schedule output of variable-output view maps. // Option 1: Schedule output using a specified file name "StandAge" //TimeSinceFire Freq: baseTimeStep * 10 File:".\cell\StandAge" Type: GRASS COMPRESSED   Relative // Option 2: Schedule output to a specified directory using the existing layer name TimeSinceFire Freq: baseTimeStep * 10 Directory: ".\cell\" Type: GRASS COMPRESSED Relative StandAge Freq: baseTimeStep * 10 Directory: ".\cell\" Type: GRASS COMPRESSED Relative

Suggested Experiments
To explore this cellular automata model further, try the following: