SYLVA Documentation
Version 2.5.0 - Production Release
SYLVA (Thermodynamic-Fuel Continuum Framework) is an operational intelligence system for assessing rapid fire spread probability in Mediterranean forest systems by integrating nine physically-based, measurable parameters into a unified command-center ready forecasting platform.
Current Status
v2.5.5 - PRODUCTION READY ✅
- Operational Dashboard with command center interface
- Quantitative Risk Score (0-100 scale)
- WUI Evacuation Timing (±2 minute accuracy)
- Threat Zone Modeling (Elliptical fire growth)
- Validated against 213 Mediterranean wildfires
Installation
System Requirements
- Python 3.8+
- NumPy >= 1.19.0
- SciPy >= 1.5.0
- Pandas >= 1.1.0
- Matplotlib >= 3.3.0
- Scikit-learn >= 0.23.0
Installation from GitLab
git clone https://gitlab.com/gitdeeper2/sylva.git
cd sylva
pip install -e .
Verify Installation
python -c "import sylva_fire; print(sylva_fire.__version__)"
# Expected output: 2.5.5
Note
For operational deployment, Docker containers are recommended. See the Deployment section.
Quick Start
Generate Operational Report
from scripts.generate_daily_report import DailyReportGenerator
# Initialize generator
generator = DailyReportGenerator()
# Define fire scenario parameters
params = {
"region": "Attica, Greece",
"wui_distance": 1.5, # km to Wildland-Urban Interface
"parameters": {
"lfm": 68, # Live Fuel Moisture (%)
"dfm": 5.1, # Dead Fuel Moisture (%)
"cbd": 0.14, # Canopy Bulk Density (kg/m³)
"wind_speed": 10.4, # Wind Speed (m/s)
"vpd": 46.7, # Vapor Pressure Deficit (hPa)
"drought_code": 487, # Canadian Drought Code
"slope": 5 # Terrain Slope (degrees)
}
}
# Generate complete report
report = generator.generate_complete_report(params)
# Display key metrics
print(f"Risk Level: {report['summary']['risk']['level']}")
print(f"Risk Score: {report['summary']['risk']['score']}/100")
print(f"Spread Distance: {report['operational_intelligence']['spread_projection']['max_distance_km']} km")
Command Center Dashboard
# Generate dashboard from command line
python scripts/generate_daily_report.py
python reports/sylva_operational_dashboard.py
# View dashboard
cat reports/daily/*_DASHBOARD.txt
Expected Output
The system generates three files:
sylva_briefing_*.json- Raw datasylva_briefing_*.txt- Formatted report*_DASHBOARD.txt- Command center view
The Nine Parameters
SYLVA integrates nine essential parameters to quantify rapid fire spread probability:
| Parameter | Symbol | Units | Critical Threshold |
|---|---|---|---|
| Live Fuel Moisture | LFM | % | < 85% |
| Dead Fuel Moisture | DFM | % | < 8% |
| Canopy Bulk Density | CBD | kg/m³ | > 0.20 |
| Surface Fuel Load | SFL | tons/ha | 15-80 |
| Fuel Bed Depth | FBD | m | 0.3-4.0 |
| Wind Vector | Vw | m/s | > 8 |
| Vapor Pressure Deficit | VPD | hPa | > 25 |
| Aspect | - | degrees | SW-W (225°) |
| Drought Code | DC | - | > 400 |
Parameter Acquisition
Live Fuel Moisture (LFM)
- Sentinel-2 NDWI inversion at 20m resolution
- 5-day revisit interval
- Field validation campaigns for calibration
Dead Fuel Moisture (DFM)
- Canadian Fine Fuel Moisture Code (FFMC)
- Automatic weather station networks (10-minute observations)
- Equilibrium moisture content calculations
Canopy Bulk Density (CBD)
- Landsat-derived with LiDAR validation
- European Forest Inventory data
- Regional allometric equations
Wind Vector (Vw)
- WindNinja/WindWizard topographic adjustment algorithms
- AWS networks with 10m standardization
- Terrain channeling and acceleration effects
API Reference
Core Modules
DailyReportGenerator
Main class for generating operational fire behavior reports.
from scripts.generate_daily_report import DailyReportGenerator
generator = DailyReportGenerator()
# Generate complete report
report = generator.generate_complete_report(params)
# Generate specific sections
summary = generator.generate_summary(params)
operational = generator.generate_operational_intelligence(params)
resources = generator.generate_resource_requirements(params)
OperationalDashboard
Command center dashboard generator.
from reports.sylva_operational_dashboard import OperationalDashboard
dashboard = OperationalDashboard(report_data)
dashboard.generate() # Creates *_DASHBOARD.txt file
Core Functions
calculate_rapid_spread_index()
from sylva_fire.integration import calculate_rapid_spread_index
rsi = calculate_rapid_spread_index(
lfm=68.0,
dfm=5.1,
cbd=0.14,
wind_speed=10.4,
vpd=46.7,
drought_code=487
)
# Returns: float (0-100 scale)
calculate_crown_fire_probability()
from sylva_fire.forecasting import calculate_crown_fire_probability
crown_prob = calculate_crown_fire_probability(
cbd=0.14,
wind_speed=10.4,
canopy_moisture=68.0
)
# Returns: float (0-1 probability)
calculate_spread_rate()
from sylva_fire.core import calculate_spread_rate
ros = calculate_spread_rate(
fuel_type="dry_grassland",
dfm=5.1,
wind_speed=10.4,
slope=5.0
)
# Returns: float (m/min)
Operational Dashboard
Risk Score Calculation
The quantitative risk score (0-100) is calculated from six factors:
RiskScore = DFM(0-25) + Wind(0-25) + VPD(0-15) +
DC(0-15) + Crown(0-10) + Containment(0-10)
Decision Thresholds
| Score Range | Risk Level | Color | Evacuation Decision |
|---|---|---|---|
| 80-100 | EXTREME | ⚫ Black | IMMEDIATE EVACUATION |
| 65-79 | VERY HIGH | 🔴 Red | PREPARE FOR EVACUATION |
| 50-64 | HIGH | 🟠 Orange | EVACUATION WARNING |
| 35-49 | MODERATE | 🟡 Yellow | MONITOR |
| 0-34 | LOW | 🟢 Green | ROUTINE |
Dashboard Output Format
🔥 SYLVA OPERATIONAL DASHBOARD 🔴 VERY HIGH RISK
────────────────────────────────────────────────
RISK LEVEL: 🔴 VERY HIGH (Score: 72/100)
WUI ARRIVAL: 31 minutes - 🟠 PREPARE FOR EVACUATION
SPREAD: 4.3km in 90min (Dry Grassland)
CONTAINMENT: 🔴 VERY DIFFICULT (Success: 30%)
CROWN FIRE: 🔴 95% potential - VERY HIGH
🎯 PRIMARY RISK DRIVERS
────────────────────────────────────────────────
1. Wind: 87% ████████
2. DFM: 83% ████████
3. VPD: 80% ████████
Examples
Example 1: Mati Fire 2018
Historical validation case from Greece's deadliest wildfire.
params = {
"region": "Attica, Greece",
"date": "2018-07-23",
"wui_distance": 1.5,
"parameters": {
"lfm": 68.0,
"dfm": 5.1,
"cbd": 0.14,
"sfl": 35.0,
"fbd": 0.8,
"wind_speed": 10.4,
"vpd": 46.7,
"aspect": 225,
"drought_code": 487,
"slope": 5.0
}
}
report = generator.generate_complete_report(params)
# Results:
# Risk Score: 72/100 (VERY HIGH)
# Max ROS: 47.7 m/min
# Spread Distance: 4.3 km in 90 minutes
# WUI Arrival: 31 minutes
# Crown Fire: 95% probability
Example 2: Custom Scenario
params = {
"region": "Custom Location",
"wui_distance": 2.0,
"parameters": {
"lfm": 75.0,
"dfm": 8.0,
"cbd": 0.18,
"wind_speed": 12.0,
"vpd": 38.0,
"drought_code": 420
}
}
report = generator.generate_complete_report(params)
Validation Results
Overall Performance
| Metric | Value |
|---|---|
| Probability of Detection (POD) | 0.83 |
| False Alarm Ratio (FAR) | 0.16 |
| Critical Success Index (CSI) | 0.71 |
| AUC (Area Under ROC Curve) | 0.88 |
| Brier Skill Score | 0.36 |
Fuel Type Performance
| Fuel Type | Cases | SYLVA POD | Improvement |
|---|---|---|---|
| Pinus halepensis | 68 | 0.86 | +15% |
| Quercus ilex | 42 | 0.81 | +14% |
| Mediterranean maquis | 53 | 0.84 | +15% |
| Dry grassland | 24 | 0.79 | +22% |
Deployment
Docker Deployment
# Build Docker image
docker build -t sylva:2.5.5 .
# Run container
docker run -d \
--name sylva-fire \
-v $(pwd)/reports:/app/reports \
sylva:2.5.5
# Generate report
docker exec sylva-fire python scripts/generate_daily_report.py
Production Environment
Recommended Setup
- Ubuntu 20.04 LTS or later
- Python 3.8+ virtual environment
- Automated cron jobs for regular reports
- Integration with automatic weather station networks
- Sentinel-2 data pipeline for live fuel moisture
Cron Job Example
# Run SYLVA report every 6 hours
0 */6 * * * cd /opt/sylva && python scripts/generate_daily_report.py
Troubleshooting
Common Issues
Issue: Import Error
Error: ModuleNotFoundError: No module named 'sylva_fire'
Solution: Install package in development mode:
pip install -e .
Issue: Missing Dependencies
Error: Missing NumPy, SciPy, or other dependencies
Solution: Install all requirements:
pip install -r requirements.txt
Issue: Parameter Validation
Warning: Invalid parameter ranges
Solution: Ensure parameters are within valid ranges:
- LFM: 40-120%
- DFM: 2-25%
- CBD: 0.05-0.50 kg/m³
- Wind: 0-30 m/s
Support
For additional support:
- GitLab Issues: https://gitlab.com/gitdeeper3/sylva/-/issues
- Email: [email protected]
- Documentation: https://sylva-fire.readthedocs.io