Metadata-Version: 2.4
Name: wildfire-fwi
Version: 0.1.0
Summary: A modern Python implementation of the Canadian Forest Fire Weather Index (FWI) System
Author-email: Maximilian Bernhard <ktownmaxi@outlook.com>
Project-URL: Homepage, https://github.com/ktownmaxi/wildfire-fwi
Project-URL: Issues, https://github.com/ktownmaxi/wildfire-fwi/issues
Project-URL: Pull Requests, https://github.com/ktownmaxi/wildfire-fwi/pulls
Keywords: wildfire,fire-danger,fwi,cffdrs,meteorology
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# Wildfire-fwi

A modern Python implementation of the Canadian Forest Fire Weather Index (FWI) System.

This repository provides the core components for calculating the Canadian Forest Fire Danger Rating System (CFFDRS) indices, based on daily meteorological observations.

## Overview

The FWI system consists of six components that rate the relative fire potential. The components account for the effects of fuel moisture and wind on fire behavior.

Calculated indices:
- **FFMC**: Fine Fuel Moisture Code
- **DMC**: Duff Moisture Code
- **DC**: Drought Code
- **ISI**: Initial Spread Index
- **BUI**: Buildup Index
- **FWI**: Fire Weather Index

## Requirements

- Python >= 3.8
- `pytest` (for running tests)

## Installation

To install the package in editable mode with test dependencies:

```bash
pip install -e ".[test]"
```

## Usage

You can import the calculation functions from the `wildfire_fwi` package:

```python
from wildfire_fwi import (
    calculate_ffmc,
    calculate_dmc,
    calculate_dc,
    calculate_isi,
    calculate_bui,
    calculate_fwi
)

# Example: FFMC Calculation
# Parameters: temperature, relative humidity, wind speed, precipitation, previous FFMC
ffmc = calculate_ffmc(17.0, 42.0, 25.0, 0.0, 85.0)
print(f"FFMC: {ffmc}")
```

## Scripts & Commands

- **Run tests**:
  ```bash
  pytest
  ```

## Project Structure

```text
wildfire-fwi/
├── src/
│   └── wildfire_fwi/
│       ├── __init__.py    # Package entry point
│       └── core.py        # Core FWI calculation logic
├── tests/
│   └── test_table7.py     # Validation against Standard Reference Data (Table 7)
├── pyproject.toml         # Project metadata and dependencies
├── LICENSE                # MIT License
└── README.md              # Project documentation
```

## Tests

The project uses `pytest` for validation. The test suite includes a validation against the standard FWI "Table 7" reference data to ensure accuracy.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
