Skip to content

Commit

Permalink
added burnTimes for each zone in the city to topModel
Browse files Browse the repository at this point in the history
  • Loading branch information
Paytonco committed Jan 29, 2022
1 parent 2b3db30 commit 514fd91
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion topModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import model

initialState = np.zeros((100,200))
initialState[50,50] = 0.1
initialState[49,57] = 0.1
#city is at initialState[46:54,125:142]
burnTimes = np.zeros((8,17))

tempHigh = np.array([94,87,86,97,98,89,92,96,98,99,103,103,97,91])
tempLow = np.array([60,56,55,59,61,61,57,58,59,64,65,64,62,57])
Expand All @@ -13,3 +15,11 @@

testModel = model.firemodel(initialState, tempHigh, tempLow, precip, wind, humid)

for i in range(336):
testModel.timeStep()
for j in range(8):
for k in range(17):
if testModel.state[j+46,k+125] != 0:
burnTimes[j,k] = i + 1

fig, ax1 = plt.imshow(burnTimes,cmap=plt.get_cmap('inferno'))

0 comments on commit 514fd91

Please sign in to comment.