This repository contains the code used for the submission "Physics-Guided Emulation for Simulating Prescribed Fires". This project relates to the problem of fuel density prediction for prescribed fires.
We follow the guidelines below to train and evaluate the model.
The code is implemented using Tensorflow 2.0 and NVIDIA A40 GPU. The training time is 5 hours. Training the model without the GPU requires ~8 hours.
In order to run the code, make sure all the libraries from the requirements.txt file are installed in your conda environment.
Data can be generated following the instructions given in this GitHub repository. The details about wind speed, wind direction and ignition pattern combinations used in our experiments are given in DATA/indices.txt file. The columns in the txt file represent the sample id, wind direction, wind speed and ignition pattern.
The dataset consists of 50 training examples and 50 test samples. The initian wind speed and wind direction values are scalars that are repeated throughout the grid and sequence to match the other input tensors. Wind speed can vary from 1 m/s to 15 m/s. Wind direction varies from 230
We use simulation runs from the QUIC-Fire model \footnote[1]{Simulation runs can be generated using the code provided in \href{https://github.com/QUIC-Fire-TT/ttrs_quicfire/tree/main}{this GitHub repository}} to learn the prescribed fire emulator. To test generalization under different environmental factors, the simulation runs include 5 different ignition patterns, 7 wind speeds, and 11 wind directions. We simulate and use 100 runs as training examples. The simulation runs are for a grassland setting with two-dimensional evolution of fires captured in 300 x 300 cells grid over
-
Hyper-parameters were fine-tuned using random grid search. Physics guided loss term penalty coefficients were selected from the grid {10.0, 2.0, 1.0, 0.1, 0.01, 0.001, 0.0001, 0.00001}. Similarly, learning rate was fine tuned from the grid {0.03, 0.01, 0.001, 0.0001, 0.0003, 0.0004, 0.0005, 0.0008, 0.00005, 0.00001 }.
-
The average MSEs that are reported are from models that are trained and tested with 10 repetitions.
-
As mentioned in the main text, we evaluate several metrics that compute how well the model predicts the evolution of fire over time. In the tables, the downward arrow indicated that lower values of evaluation metrics indicate better model performance. We evaluate MSE, burned area MSE, unburned area MSE and fire metric MSE (ROS MSE + BA MSE) on test set. We formulate a metric, \textbf{Dynamic MSE (DMSE)}, that evaluates model performance based on change in fuel density over time. For time steps with bigger change in the observed fuel density, we ensure that the error in predictions are penalized more, $ DMSE = {(\sum_N (Y_t - Y_{t-1}) \cdot (||\hat{Y}t - Y_t||) )}/{( \sum_N (Y_t - Y{t-1}))}$. We can further validate the physical consistency of the predictions by evaluating how often the physical constraints are met in the predicted values using the following metrics. \textbf{Metric}${\text{FT}}$ is the percentage of cells that do not follow the fuel transport constraint in the predicted values. \textbf{Metric}${\text{Burned}}$ is the percentage of unburned cells that are predicted to be burned. \textbf{Metric}${\text{Unburned}}$ is the percentage of unburned cells where fuel densities are underestimated. \textbf{Metric}${\text{False Positive}}$ is the percentage of burning cells that are predicted to be burned. \textbf{Metric}$_{\text{False Negative}}$ is the percentage of burning cells that are predicted to be unburned.
-
For the data sparcity experiments, we report the mean and standard error in MSE values over all test samples.
-
Average training time for the physics-guided model is 5 hours. Average model inference time is 24 seconds.
-
We use NVIDIA A40 GPU for training and Tensorflow for building the model.
Model can be build using the SOURCE/TRAIN/train.py file and evaluated using the SOURCE/TEST/test.py file. Files SOURCE/TRAIN/models.py and SOURCE/TRAIN/losses.py outline the alternate models that can also be used. In the current format, train.py implements the PGCL model.
ICDM_PrescribedFires
│ README.txt
└───SOURCE
│ │ TEST
│ │ test.py
│ │ plotting.ipynb
│ │ TRAIN
│ │ train.py
│ │ FIGURES
│ │ PGCLplus.png
│ │ ...
│
└───DATA
│ │ RESULTS
│ │ ...
QUIC-Fire model for data generation:
Linn, R. R., Goodrick, S. L., Brambilla, S., Brown, M. J., Middleton, R. S., O'Brien, J. J., & Hiers, J. K. (2020). QUIC-fire: A fast-running simulation tool for prescribed fire planning. Environmental Modelling & Software, 125, 104616.