Skip to content

Commit

Permalink
added topModel and fixed precipitation simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Paytonco committed Jan 29, 2022
1 parent 592dd74 commit 2b3db30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions topModel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import numpy as np
import matplotlib.pyplot as plt
import model

initialState = np.zeros((100,200))
initialState[50,50] = 0.1

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])
precip = np.zeros((14)) * 0.01
wind = np.array([15,16,12,9,13,17,12,15,10,12,10,9,14,13]) * 1.609 #convert to km/hr
humid = np.array([49.2,57.1,55.2,41.5,40.0,44.1,45.1,42.5,45.3,38.1,34.3,35.3,50.0,56.9])*0.01

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

1 change: 1 addition & 0 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def findKernel(state,wind,humidity,precip,temp):
precipRand = np.random.rand()
if precipRand < precip:
kernel[1,1] = 1
return kernel
if temp <= 51.61: #dew point
kernel[1,1] = 1
return kernel
Expand Down

0 comments on commit 2b3db30

Please sign in to comment.