Wildfire Modeling
Wildfire Modeling¶
The wildfire model can be imported using the following command
from IPython.display import display, HTML
import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default = "plotly_mimetype"/opt/homebrew/Caskroom/miniconda/base/envs/erad/lib/python3.12/site-packages/kaleido/__init__.py:14: UserWarning:
Warning: You have Plotly version 6.0.1, which is not compatible with this version of Kaleido (1.0.0).
This means that static image generation (e.g. `fig.write_image()`) will not work.
Please upgrade Plotly to version 6.1.1 or greater, or downgrade Kaleido to version 0.2.1.
from erad.models.hazard import FireModel, FireModelAreaAn instance of FireModel is a list of affected areas with each FireModelArea mapping the following pareameters.
affected_area: The timestamp of the wild fire event
wind_direction: Direction of the wind
wind_speed: Average wind speed in the area
from datetime import datetime
from shapely.geometry import Polygon
from gdm.quantities import Angle
from erad.quantities import Speed
fire_affect_area = FireModelArea(
affected_area=Polygon(
[
(-120, 36),
(-121, 36),
(-121, 37),
(-121, 367),
]
),
wind_speed=Speed(50, "miles/hour"),
wind_direction=Angle(45, "deg"),
)
fire_model = FireModel(
name="fire model",
timestamp=datetime.now(),
affected_areas=[fire_affect_area],
)
fire_model.pprint()Loading...
An example of the FireModel can be built using the example() methods for testing purposes.
fire_model = FireModel.example()
fire_model.pprint()Loading...
Building from historical events¶
Erad allows users to build fire models from historic wild fire events as well. The from_wildfire_name class method can be used to build fire models representing historic events.
fire_model = FireModel.from_wildfire_name("GREAT LAKES FIRE")
fire_model.pprint()Loading...
Plotting Wildfire Model¶
fig = go.Figure()
fire_model.plot(figure=fig)
fig.show()Loading...
- Taylor, S., Setyawan, G., Cui, B., Zamzam, A., & Roald, L. A. (2023). Managing Wildfire Risk and Promoting Equity through Optimal Configuration of Networked Microgrids. Managing Wildfire Risk and Promoting Equity through Optimal Configuration of Networked Microgrids, 189–199. 10.1145/3575813.3595196