LANDIS-II-Foundation / Extension-SCRPPLE

Social and Climate-driven fire extension.
https://landis-ii-foundation.github.io/Extension-SCRPPLE/
Apache License 2.0
1 stars 10 forks source link

Bug fix in assigning suppression and raising warning #124

Closed ZacharyRobbins closed 3 years ago

ZacharyRobbins commented 3 years ago

This preserves the indexing and makes sure the error isn't raised. I can't get the exception in 507 to raise however, I think the logic is off. Any value that is on the map would register the first condition and then crash if it didn't have a position in the SuppressoinFWI_table. I don't know how a value would not meet that condition (Even when the condition was >10) because it is really about the first term (Sitevars.XXXSupressionIndex[Site]) being a value outside of the table's values (0-3). The catch could be if (index- ((int)this.IgnitionType * 10)<4)... This would exclude values greater than 3. It also could be if(....>0 and <4). But it also works as is... as it will just crash.

rmscheller commented 3 years ago

So, is this bug fixed? Is it lacking a try-catch when a table value is missing?