Jump to content

Simple empirical fire model

From SELESwiki
Revision as of 15:44, 14 November 2006 by Fei (talk | contribs)

Summary

Screenshot

Download Model

Download the .scn, .sel and .lse files by clicking on the following link: File:SimpleFireModel.zip

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

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

Model.sel

Seles Model Information
Time Units: Day Year 365.25
Landscape Events:
 Succession.lse
 Fire.lse
 ReportResults.lse
Variable-Input View Maps:
 Species = initialSpecies
 TimeSinceFire = initialTimeSinceFire
Variable-Output View Maps:
 Species
 TimeSinceFire
Global Constants:
 MaxTSF = 200
 rAspen = 1
 rPine = 2
 rSpruce = 3
 rBalsam = 4
 Aspen = 1
 Pine = 2
 Spruce = 3
 Balsam = 4
Output Model Bounds:
 TimeSinceFire: MaxTSF
 Species: 4
Global Variables:
 ForestSize = 250000
 MeanFireSize = 100
 MeanFiresPerYear = 10
 FireCycle = ForestSize /(MeanFireSize * MeanFiresPerYear)
 oldFireCycle = FireCycle OFF
 PatchBased = TRUE
 SProbAspen2Spruce = 0.1
 SProbPine = 0.01
 SProbPine2Spruce = 0.5
 
 RecordResults = TRUE
Output Frequency: 365.250000


consumer.lse

 // Process based definition for  consumber behaviour in producer/consumer  model
LSEVENT: Consumder
DEFINITIONS
  LAYER: LSState, PrevLSState
  GLOBAL CONSTANT: Uncolonised, Producer,  Consumer
  GLOBAL VARIABLE: pInitialConsumer,   pSpreadConsumer, pDeathConsumer //,  SpreadRateConsumer
ENDDEF
// Just start once
RETURNTIME = 0
// Initialize in an empty cell
PROBINIT = IF LSState EQ Uncolonised THEN  pInitialConsumer ELSE 0
TRANSITIONS
  // Decide if this cell survives
  Dies = UNIFORM(0,1) < pDeathConsumer
  // If the consumer is dying
  IF Dies
      LSState = Uncolonised
  ENDFN
  TRANSITIONS = !Dies
  LSState = Consumer
ENDTR
SPREADTIMESTEP = 1 //SpreadRateConsumer
SPREADLOCATION
  REGION CENTRED(0,1, WRAPPED)
ENDSL
SPREADPROB
  // Always spread to the same cell  (self), and spread probabilistical to  neighbouring producer cells
 SPREADPROB = IF Location EQ (SOURCE  Location) THEN 1
              ELSE IF PrevLSState EQ   Producer  THEN pSpreadConsumer
              ELSE 0
ENDSP

producer.lse

// Process based definiton of producer  behaviour in producer/consumer model
LSEVENT: Producer
DEFINITIONS
  LAYER: LSState, PrevLSState
  GLOBAL CONSTANT: Uncolonised, Producer,  Consumer
  GLOBAL VARIABLE: pInitialProducer,  pSpreadProducer, pDeathProducer //,  SpreadRateProducer
ENDDEF
// Just start once
RETURNTIME = 0
// Initialize in an empty cell
PROBINIT = IF LSState EQ Uncolonised THEN  pInitialProducer ELSE 0
TRANSITIONS
  // Decide if this cell survives
  Dies = UNIFORM(0,1) < pDeathProducer
  // If the producer is dying
  IF Dies
     LSState = Uncolonised
  ENDFN
  TRANSITIONS = (!Dies)
  LSState = Producer
ENDTR
SPREADTIMESTEP = 1 //SpreadRateProducer 
SPREADLOCATION
  notEaten = PrevLSState EQ Producer //  check that the producer wasn't eaten  during the last step
  REGION CENTRED(0, 1, WRAPPED)
     DECISION notEaten // don't spread if  eaten (i.e. stop process)
ENDSL
SPREADPROB
  // Always spread to the same cell  (self), and spread probabilistically to  empty neighbouring cells
 SPREADPROB = IF Location EQ (SOURCE  Location) THEN 1 // spread to same cell
              ELSE IF PrevLSState EQ  Uncolonised THEN pSpreadProducer
              ELSE 0
ENDSP

update.lse

// Event to update time step
LSEVENT: Update
DEFINITIONS
  LAYER: LSState, PrevLSState
ENDDEF
RETURNTIME
  RETURNTIME = 1
  PrevLSState = LSState
ENDRT
NUMCLUSTERS = 0

Suggested Experiments

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