The Wildfire ROS Models Library is a comprehensive Python package designed for simulating the Rate of Spread (ROS) of wildfires. Inspired by various ROS model publications, this library serves as a powerful tool for researchers and practitioners in the field of wildfire management and simulation. It facilitates the intercomparison of different ROS formulations, enhancing the understanding and effectiveness of wildfire behavior predictions.
- Diverse ROS Models: Implements multiple ROS models with references to their original publications.
- Fuel Data Management: Organized data and configurations for various fuel types, both model-specific and generic.
- Case Studies: Predefined scenarios demonstrating ROS models under different conditions and fuel types.
- C++ Code Exporter: Generate C++ code compatible with the ForeFire solver, enabling integration into larger wildfire simulation frameworks.
- Sensitivity Analysis: Tools for performing and visualizing sensitivity analyses using Sobol methods.
- Neural Network Integration: Emulate ROS models with neural networks for enhanced performance and scalability.
- Comprehensive Testing: Example scripts and plots for validating and comparing ROS models.
- Python 3.7 or higher
pip
package manager
-
Clone the Repository:
git clone https://github.com/yourusername/wildfire_ROS_models.git cd wildfire_ROS_models
-
Create a Virtual Environment (Optional but Recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Install the Package:
pip install --editable .
The
--editable
flag allows you to make changes to the code without reinstalling the package.
After installation, you can use the ROS models in your Python scripts as follows:
from wildfire_ROS_models.models import RothermelAndrews2018
from wildfire_ROS_models.runROS import run_model, plot_results
# Define model parameters
parameters = {
'wind_speed': 10, # in mph
'slope_deg': 0,
# Add other necessary parameters
}
# Run the model
results = run_model("RothermelAndrews2018", parameters, "wind_speed", range(0, 20, 0.1))
# Plot the results
plot_results(results, 'wind_speed', 'ROS_ftmin')
Refer to the tests
directory for comprehensive examples and test scripts that demonstrate the application of various ROS models and sensitivity analyses.
cd tests
python test_models.py
wildfire_ROS_models/
│
├── __init__.py
├── Balbi2020.py
├── Cruz.py
├── RothermelAndrews2018.py
├── fuels_database.py
├── model_set.py
├── neuralNetROS.py
├── runROS.py
├── sensitivity.py
├── interactive_polar_plot.py
├── py_ROS_models_to_forefire_cpp.py
├── utils.py
├── scripts/
│ ├── __init__.py
│ ├── sensitivity_analysis.py
│ └── ... (other scripts)
│
├── tests/
│ ├── __init__.py
│ ├── test_models.py
│ └── test_sensitivity_analysis.py
│
├── docs/
│ └── ... (documentation files)
│
├── README.md
├── LICENSE
├── setup.py
├── requirements.txt
├── MANIFEST.in
└── .gitignore
Contains various case studies and scenarios demonstrating the application of ROS models under different conditions and fuel types.
A module that generates C++ code compatible with the ForeFire solver from Python files, facilitating the integration of ROS models into larger wildfire simulation frameworks.
Hosts data and configurations related to different types of fuels, including both model-specific and generic data.
Includes a variety of ROS models, each referencing their original publication for credibility and ease of comparison.
Contains test scripts and example applications of ROS models, along with sample plots to compare their outputs.
Contributions to the Wildfire ROS Models Library are welcome! Whether you're adding new models, improving existing ones, or enhancing documentation, your efforts help advance wildfire research and management.
-
Fork the Repository: Click the "Fork" button at the top right of this repository's GitHub page.
-
Clone Your Fork:
git clone https://github.com/yourusername/wildfire_ROS_models.git cd wildfire_ROS_models
-
Create a New Branch:
git checkout -b feature/your-feature-name
-
Make Your Changes:
- Add new models by copying existing model Python files and using the same function names.
- Update documentation as necessary.
- Ensure all new code includes proper docstrings and follows the project's coding standards.
-
Commit Your Changes:
git add . git commit -m "Add [description of your changes]"
-
Push to Your Fork:
git push origin feature/your-feature-name
-
Create a Pull Request: Navigate to your fork on GitHub and click the "Compare & pull request" button. Provide a clear description of your changes and submit the pull request.
- Consistency: Follow the existing coding style and conventions.
- Documentation: Ensure all new models and functions are well-documented.
- Testing: Add or update tests to cover new functionalities.
- Commit Messages: Write clear and descriptive commit messages.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
- EcoFire FirebehavioR Data
- Hourly FFMC
- Original ROS Models Publications
For questions, suggestions, or contributions, please contact:
Jean-Baptiste Filippi
SPE
[email protected]