# wirc-sjsu/firebench architecture

> Architecture diagram of the GitHub repository wirc-sjsu/firebench, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wirc-sjsu/firebench
- Repository: https://github.com/wirc-sjsu/firebench

## Overview

##### Main Components

a. Core Components:
- Rate of Spread (ROS) Models Module
- Tools Module
- Wind Interpolation Module
- Data Management System
- Workflow Engine

b. External Components:
- Input Data Sources
- Local Database
- Validation Datasets
- Output Results Storage

**┌─ Input Layer ─────────────────────────────────────┐**
- Fuel Models Data                                │
- Environmental Parameters                        │
- Validation Datasets                             │
- ┬───────────────────────────┘
- ↓
**┌─ Core Processing Layer ──────────────────────────┐**
- ┌─ Models ─────┐  ┌─ Tools ────┐  ┌─ Wind ────┐ │
- Vegetation │  │ - Data     │  │ - Wind    │ │
- Urban     │  │   Quality   │  │   Red.    │ │
- ROS       │  │ - Utils    │  │   Factor  │ │
- ┘  └───────────┘  └──────────┘ │
- ┬───────────────────────────┘
- ↓
**┌─ Analysis Layer ────────────────────────────────┐**
- Accuracy Assessment                           │
- Efficiency Measurement                        │
- Sensitivity Analysis                          │
- Validation                                    │
- ┬───────────────────────────┘
- ↓
**┌─ Output Layer ─────────────────────────────────┐**
- Benchmarking Results                         │
- Performance Metrics                          │
- Validation Reports                           │
- Workflow Results                             │
- ┘

##### Key Relationships

- Integration points between different models
- Workflow execution paths
- Database interactions
- Validation process flow

##### Technical Details

- Python package structure
- Testing framework integration
- CI/CD pipeline connection
- Documentation system

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef input fill:#a8d1f0,stroke:#000
    classDef core fill:#90EE90,stroke:#000
    classDef analysis fill:#FFB347,stroke:#000
    classDef output fill:#DDA0DD,stroke:#000
    classDef database fill:#f5f5f5,stroke:#000
    
    %% Input Layer
    subgraph InputLayer
        FuelData["Fuel Models Data"]
        EnvParams["Environmental Parameters"]
        ValidationData["Validation Datasets"]
    end
    
    %% Core Processing Layer
    subgraph CoreLayer
        subgraph ModelsSection
            ROSModels["ROS Models"]:::core
            VegModel["Vegetation Model"]:::core
            UrbanModel["Urban Model"]:::core
        end
        
        subgraph ToolsSection
            Tools["Tools Module"]:::core
            DataQuality["Data Quality"]:::core
            Utils["Utils"]:::core
        end
        
        subgraph WindSection
            WindInterp["Wind Interpolation"]:::core
            WindRed["Wind Reduction Factor"]:::core
        end
    end
    
    %% Analysis Layer
    subgraph AnalysisLayer
        Accuracy["Accuracy Assessment"]:::analysis
        Efficiency["Efficiency Measurement"]:::analysis
        Sensitivity["Sensitivity Analysis"]:::analysis
        Validation["Validation System"]:::analysis
    end
    
    %% Output Layer
    subgraph OutputLayer
        BenchResults["Benchmarking Results"]:::output
        PerfMetrics["Performance Metrics"]:::output
        ValReports["Validation Reports"]:::output
        WorkflowRes["Workflow Results"]:::output
    end
    
    %% Data Management
    LocalDB[("Local Database")]:::database
    
    %% Relationships
    FuelData --> ROSModels
    EnvParams --> ROSModels
    ValidationData --> Validation
    
    ROSModels --> VegModel
    ROSModels --> UrbanModel
    
    Tools --> DataQuality
    Tools --> Utils
    
    WindInterp --> WindRed
    
    VegModel & UrbanModel --> Accuracy
    VegModel & UrbanModel --> Efficiency
    VegModel & UrbanModel --> Sensitivity
    
    Accuracy --> BenchResults
    Efficiency --> PerfMetrics
    Sensitivity --> ValReports
    Validation --> WorkflowRes
    
    %% Component Mappings
    click ROSModels "https://github.com/wirc-sjsu/firebench/tree/main/src/firebench/ros_models/"
    click VegModel "https://github.com/wirc-sjsu/firebench/blob/main/src/firebench/ros_models/surface_for_vegetation.py"
    click UrbanModel "https://github.com/wirc-sjsu/firebench/blob/main/src/firebench/ros_models/surface_for_urban.py"
    click Tools "https://github.com/wirc-sjsu/firebench/tree/main/src/firebench/tools/"
    click DataQuality "https://github.com/wirc-sjsu/firebench/blob/main/src/firebench/tools/check_data_quality.py"
    click Utils "https://github.com/wirc-sjsu/firebench/blob/main/src/firebench/tools/utils.py"
    click WindInterp "https://github.com/wirc-sjsu/firebench/tree/main/src/firebench/wind_interpolation/"
    click WindRed "https://github.com/wirc-sjsu/firebench/blob/main/src/firebench/wind_interpolation/wind_reduction_factor.py"
    click LocalDB "https://github.com/wirc-sjsu/firebench/blob/main/src/firebench/tools/local_db_management.py"
    click FuelData "https://github.com/wirc-sjsu/firebench/tree/main/data/fuel_models/"
    click ValidationData "https://github.com/wirc-sjsu/firebench/tree/main/data/ros_model_validation/"
    click Validation "https://github.com/wirc-sjsu/firebench/tree/main/tests/regression/"
    click WorkflowRes "https://github.com/wirc-sjsu/firebench/tree/main/workflow/rate_of_spread_models_analysis/"
```
