cffdrs
Python tools for the Canadian Forest Fire Danger Rating System (CFFDRS): the Fire Behavior Prediction (FBP) System and the Fire Weather Index (FWI) System.
Calculations accept scalars or NumPy arrays (e.g. raster grids) through the same API, propagate NoData/NaN cells via masked arrays, and include a block-based multiprocessing driver for large rasters.
Installation
Install from PyPI. The prebuilt wheel already contains the compiled Rust extension, so no Rust compiler is needed:
pip install cffdrs-fire
The PyPI distribution is named cffdrs-fire; the import name is still cffdrs
(from cffdrs.cffbps import FBP).
Or build a source checkout, which builds the extension and needs the Rust
toolchain described below: pip install . or uv sync from the repository root.
Optional extras:
pip install "cffdrs-fire[io]" # rasterio + pandas, for raster/tabular workflows
Core dependencies: numpy>=1.24, scipy>=1.10, psutil>=5.9 (pip chooses newer
releases where an interpreter needs them).
Supported versions
| Component | Supported | Checked by |
|---|---|---|
| CPython | 3.11, 3.12, 3.13, 3.14 (requires-python >= 3.11; Python 3.10 is no longer supported) |
CI runs the full suite on 3.12 for every PR; the release workflow smoke-tests the wheel on 3.11-3.14 on each platform |
| Wheels | one cp311-abi3 wheel per platform: Linux x86-64 and ARM64 (manylinux 2_17), macOS x86-64 and ARM64, Windows x86-64 and ARM64 |
release workflow (manual dispatch or tag) |
| Rust, building from source | 1.78 or newer (the MSRV) | CI builds with the MSRV toolchain on every PR; consumers of the wheel need no Rust |
Rust crate cffdrs-fire |
1.78 or newer, no runtime dependencies | CI |
| PyO3 / rust-numpy | 0.27 | Cargo.lock |
| NumPy / SciPy | tested with NumPy 2.4-2.5 and SciPy 1.17-1.18 (see uv.lock); older NumPy 1.24+ is allowed by the metadata but not tested here |
CI uses uv.lock |
| Free-threaded Python (3.14t) | not supported | n/a |
The abi3 wheel keeps working on later CPython versions, but that does not certify future NumPy/SciPy releases or untested dependency combinations.
Package layout
| Module | Contents |
|---|---|
cffdrs.cffbps |
Fire Behaviour Prediction using the package CPU engine |
cffdrs.cffbps.python |
Explicit Python FBP backend; python/core.py orchestrates python/equations/ |
cffdrs.cffbps.common |
Shared constants, fuel-code conversion, and input validation |
cffdrs.cffbps.rust |
Explicit Rust FBP backend over the owned native grid |
cffdrs.cffbps.cupy |
Experimental CuPy GPU backend |
cffdrs.cffwis |
FWI System: FFMC/DMC/DC/ISI/BUI/FWI/DSR functions (hourly + daily) |
cffdrs.cffwis.python |
Explicit NumPy FWI reference backend |
cffdrs.cffwis.rust |
Explicit Rust FWI backend for scalars and arrays |
cffdrs.diurnal_ffmc_lawson |
Historical import path for the NumPy Lawson interpolation module |
cffdrs._rust |
Native FBP grid and FWI array bindings |
The repository is a mixed Python/Rust project. Python package sources live under
src/cffdrs; the top-level rust/ directory is a Cargo workspace containing:
cffdrs-fire: dependency-free Rustcffbpsandcffwismodules.cffdrs-py: the PyO3 binding crate that buildscffdrs._rustfor thecffdrs-firePython wheel.
The Python implementation is the behavioral reference. The Python distribution
cffdrs-fire is 0.4.1 and imports as cffdrs. The independent
cffdrs-fire Rust core is 0.5.1.
cffdrs._rust.FbpGrid is a low-level stateful grid in a private extension module;
normal Python callers use FBP, which prepares inputs and exports reference-compatible
results. Keeping rust/ beside src/ separates the Cargo workspace from Python imports.
Wheels use cp311-abi3 (one per platform). The release workflow tests Python
3.11–3.14. Future CPython ABI compatibility does not certify future NumPy/SciPy
support or untested dependency combinations. Free-threaded Python is unsupported.
Changes in Python 0.4.1 and Rust core 0.5.1
- Cheney grass and wheat. Fuel codes 30–32 add the natural, cut or grazed, and eaten-out grass spread models and their corresponding wheat applications. See Cheney grass and wheat fuel types.
- Grass curing. Use
gcfor grass curing. Thegcfalias is deprecated and is scheduled for removal in the next release. - Raster inputs. A scalar fuel code applies across the weather raster. A foliar override can supply the grid shape, and Python multiprocessing returns a full raster for each requested output.
Changes in Python 0.4.0 and Rust core 0.5.0
- Native FWI. The Rust crate implements all ten FWI functions. The Python functions keep their existing names and signatures and accept scalars, NumPy arrays, and masked arrays.
- Package-wide backend selection. Use
cffdrs.set_backend('auto'),cffdrs.set_backend('rust'), orcffdrs.set_backend('python')for FWI calls and new FBP instances. Select the Python backend for custom FWI array arithmetic or modified Lawson tables. - Rust namespaces. Import FBP through
cffdrs_fire::cffbpsand FWI throughcffdrs_fire::cffwis. The earlier crate-root FBP module paths remain available. - FBP input validation. The CPU backends reject out-of-range inputs by
default. Use
out_of_range='clip'to opt into clipping with diagnostics.
Fire Behavior Prediction (cffdrs.cffbps)
The FBP class is a facade: initialize it with fuel, terrain, and weather inputs,
run the model, and request any of the 54 output variables. The underlying equations
live in cffdrs.cffbps.python.equations as pure, typed functions if you need them directly.
Changes in 0.3.1
- Linux ARM64 wheels. The release workflow builds a native
aarch64manylinux 2_17 wheel and smoke-tests it on Python 3.11–3.14. The Python API and Rust core version are unchanged.
Breaking changes in 0.3.0
Python users are not affected: the distribution is cffdrs-fire 0.3.0, the import stays cffdrs, and the
public API is unchanged.
- Rust crate renamed. The pure Rust crate
cffbps-rustis nowcffdrs-fire(librarycffdrs_fire, crate version 0.4.0), the name of the PyPI distribution. It was not on crates.io before 0.4.1. Rust consumers (a path or git dependency, or a vendored copy) rename the package and theusepaths:cffbps-rust/cffbps_rusttocffdrs-fire/cffdrs_fire. - certifi floor in the extras. The
io,gpuandtestextras now requirecertifi>=2026.10.19. certifi 2026.10.18 removed the emSign root certificates after the eMudhra CA key compromise, and rasterio, which these extras pull in, requires certifi without a minimum. Installing an extra upgrades an older certifi.
Breaking changes in 0.2.0
The public from cffdrs.cffbps import FBP import remains supported and now
selects a backend at initialization. Import from cffdrs.cffbps.python for
the explicit reference. The following previous paths are historical migration
references, not current import targets.
Deep imports move without compatibility shims:
| Previous import | New import |
|---|---|
cffdrs.cffbps.facade |
cffdrs.cffbps.python.core |
cffdrs.cffbps.equations |
cffdrs.cffbps.python.equations |
cffdrs.cffbps.parallel |
cffdrs.cffbps.python.parallel |
cffdrs.cffbps.constants |
cffdrs.cffbps.common.constants |
cffdrs.cffbps.inputs |
cffdrs.cffbps.common.inputs |
cffdrs.cffbps.cupy_backend |
cffdrs.cffbps.cupy (implementation: cupy/core.py) |
Inside python.equations, the module fmc is now foliar_moisture: calc_fmc no longer computes everything
(it gives the foliar moisture content from nd); calc_foliar_moisture() chains calc_latn, calc_d0,
calc_dj, calc_nd, calc_fmc and calc_fme, and returns a FoliarMoistureResult (was FMCResult).
Inside python.equations, surface.py is gone: calc_sfc and calc_cfc live in consumption.py (all fuel
consumption), and calc_fire_type, calc_hfi and calc_fire_intensity_class live in the new behavior.py
(crown.py keeps only the crown determination). The Rust crate has the same modules (consumption.rs,
behavior.rs).
The historical calcC6hros stage no longer exists. A custom stage sequence replaces it with calcC6BlendCFB,
calcC6BlendCFC, calcC6CROS and calcC6HROS (in that order), computes calcPercentileCFB before
calcRosPercentileGrowth, calls calcCFB again after growth, and runs calcAccelParam after the final CFB (see
Upgrading PyroCell). Replacing only the old method name is not enough.
C6 acceleration changes. Acceleration is now computed from the final (post-blend) CFB, so for C-6 the head ROS is
unchanged but cfb, accel and hfi change. For C-6 at ws 20, flat ground, 49.48 N, 115.69 W, 100 m,
date 2023-07-15, ffmc 90, bui 80 (float32 1x1 grid): cfb 0.1286 -> 0.3676, accel 0.0751 -> 0.0336,
hfi 5752 -> 6843 (the earlier values are those of the previous stage order, reported from a PyroCell run; hros 8.448
is unchanged). Reference rasters or goldens of a model that accelerates C-6 fires need to be regenerated, after checking
the new values against alpha = 0.115 - 18.8 * CFB^2.5 * exp(-8 * CFB).
Choosing a backend
cffdrs.set_backend('auto') chooses Rust when the native extension provides both
FBP and FWI. Otherwise it selects Python for both. This is the default on first
use. Call cffdrs.set_backend('rust') to require the complete native engine or
cffdrs.set_backend('python') to use NumPy directly. A failed Rust selection
raises ImportError and preserves the previous setting. Previously imported FWI
functions use the new selection on their next call. Initialized FBP models keep
their engine.
import cffdrs
from cffdrs import cffwis
cffdrs.set_backend('rust')
ffmc = cffwis.dailyFFMC(85., 20., 50., 10., 0.)
from cffdrs.cffbps import FBP # automatic CPU selection
from cffdrs.cffbps.python import FBP as PythonFBP
from cffdrs.cffbps.rust import FBP as RustFBP # requires the extension
FBP.initialize(..., backend='auto', threads=4) uses the package default.
An explicit instance-level setting overrides the package default for that FBP
instance. backend='python' uses the reference. backend='rust' requires the
native FBP bindings and raises ImportError if they are unavailable.
backend_in_use is None before initialization and then 'python' or 'rust'.
The backend stays fixed for that instance, including reinitialization. Create a
new instance to change it. Calculation errors do not trigger fallback or replay.
With the initial, unconfigured package default, accessing calibration tables before
initialization pins that instance to Python. If an explicit package selection resolves
to Rust, initialize the calibrated instance with backend='python'.
Explicit imports never dispatch and do not take a backend= selector.
Rust threads default to 1; 0 uses all available cores. Keep 1 for many
simultaneous fires. Python ignores the automatic interface's threads argument.
Rust floating results agree with Python to rtol 1e-9, with matching missing
values; integer results agree exactly. Bit identity with NumPy is not promised.
On Rust, access computed results through getParams(['hros', ...]). Per-instance
lookup-table calibration (rosParams, open_fuel_types, etc.), result attribute
reads, runFBP(block=...), and getCBH_CFL(ftype=..., cbh=..., cfl=...) overrides
require backend='python' on the FBP instance. For Python multiprocessing,
import fbpMultiprocessArray from cffdrs.cffbps.python or select the Python
package engine. For Rust canopy injection, run
getCBH_CFL() and then setParams({'cbh': ..., 'cfl': ...}) in a staged pipeline.
Rust uses threads for parallel work. See the lifecycle and stage reference
for memory retention and supported update routes.
Every difference between the two backends that is known today is tracked in
docs/BACKEND_DIFFERENCES.md; tools/compare_backends.py
re-checks them.
FBP input ranges
The Python and Rust CPU backends raise cffdrs.cffbps.InputRangeError, a
ValueError subclass, when a caller supplies an out-of-range value at
initialization or through a checked input update. The error gives the input
name, valid bounds, invalid cell count, and up to five original cell coordinates
and values. Values such as -9999 can indicate an undeclared raster nodata value.
Mask nodata cells or represent them with NaN before passing the grid to FBP.
| Inputs | Inclusive range | Absolute rounding tolerance |
|---|---|---|
ffmc |
0–101 | 1e-5 |
pc, pdf, gc (%) |
0–100 | 1e-5 |
wd, aspect (°) |
0–360 | 5e-5° |
lat, long (°) |
−90–90 and −180–180, respectively | 5e-5° |
bui, ws, slope, gfl |
At least zero | 1e-6 |
Exactly aspect=-1 marks flat terrain. The solver uses zero effective slope,
so the combined wind speed equals the original wind speed. Small roundoff
outside a bound snaps to the bound. For larger finite deviations, opt in with
FBP.initialize(..., out_of_range='clip') to receive an InputRangeWarning
per clipped field. Infinities raise in either mode. Use whole-field assignment
or setParams for checked edits. The Python backend also rechecks fuel array
edits when calculations resume. Other NumPy slice writes bypass range checks.
Cheney grass and wheat fuel types
Use gc for grass curing (%) in each CFFBPS backend. The old Python keyword,
attribute, and setParams key gcf emit a DeprecationWarning and will be
removed in the next release.
Fuel codes 30–32 select the natural, cut or grazed, and eaten-out grass rate-of-spread models of Cheney et al. (1998) in the Python, Rust, and experimental CuPy backends. The models apply to the corresponding fully cured wheat conditions in the table, as evaluated by Cruz, Hurley, Bessell and Sullivan in 2020. Cheney et al. (1998) · Fire behaviour in wheat crops – effect of fuel structure on rate of fire spread
| Code | Label | Cheney grass model | Corresponding wheat condition | Terrain reference | Wheat consumption default |
|---|---|---|---|---|---|
| 30 | WHEAT_UNHARVESTED |
Natural grass | Unharvested wheat | O-1b | 0.53 kg/m² |
| 31 | WHEAT_HARVESTED |
Cut or grazed grass | Harvested wheat | O-1a | 0.39 kg/m² |
| 32 | WHEAT_BALED |
Eaten-out grass | Harvested and baled wheat | O-1a | 0.32 kg/m² |
For grassland runs, select the code for the fuel structure and supply the
site's curing (gc) and consumed fuel load (gfl). The defaults apply
whenever these inputs are omitted and reflect the wheat application.
import numpy as np
from cffdrs.cffbps import FBP
site = dict(wx_date=20240715, lat=55., long=-110., elevation=500.,
slope=40., aspect=180., ws=20., wd=270.,
out_request=['hros', 'bros', 'wsv', 'raz', 'hfi'])
wheat = FBP()
wheat.initialize(fuel_type=30, temp=30., rh=20., **site)
head, back, effective_wind, heading, intensity = wheat.runFBP()
mixed = FBP()
mixed.initialize(fuel_type=np.array([2, 30, 31, 32]),
ffmc=np.array([90., np.nan, np.nan, np.nan]),
bui=np.array([80., np.nan, np.nan, np.nan]),
cheney_mf_override=np.array([np.nan, 6., 6., 6.]), **site)
mixed.runFBP()
Supply air temperature temp in °C and relative humidity rh in percent for
the AM60 estimate. A finite cheney_mf_override gives measured standing
dead-fuel moisture in percent and takes precedence cell by cell. Relative
humidity and resolved moisture are clipped to 0–100% and 2–24%. Unavailable
weather stays missing. Wheat-only runs can omit FFMC and BUI. Mixed runs may
leave those inputs masked on wheat cells and wheat weather masked on other fuels.
Omitted gc uses 100% on wheat. The curing function accepts 20–100%, with
the empirical wheat comparison at 100%. Omitted or masked gfl uses the
crop-specific value in the table. Supply a measured estimate to override the
default. To restore the fuel-specific defaults after an override, set gfl
or gc to None via setParams. Zero load gives zero spread and intensity.
Final consumption also goes to zero when head spread goes to zero. Crown contributions are zero,
and FBP ISI and buildup diagnostics are missing on wheat.
This implementation follows the ConPyro conventions
for Cruz et al. (2015) curing, the Spark
low-wind and backing ellipse branches, and
Alexander (1982) heat yield. On slopes, the
specified O-1 reference curve supplies an equivalent wind for the Cheney head
and backing rates. This terrain method and the FBP open-fuel acceleration
parameter have no wheat-specific calibration. CuPy supports the same wheat
weather inputs on mixed rasters. Pass return_array_as='cupy' to CuPy's
initialize to keep raster outputs on the GPU. When changing fuel and its
required weather together, pass both in one setParams call.
Scalar example
from cffdrs.cffbps import FBP
fbp = FBP()
fbp.initialize(
fuel_type=2, # C-2 (or pass the string code 'C2')
wx_date=20240516, # YYYYMMDD, used for foliar moisture
lat=62.245533, long=-133.840363, elevation=1180,
slope=8, aspect=60, # slope %, aspect degrees
ws=24, wd=266, # wind speed km/h, direction degrees
ffmc=92, bui=31, # CFFWIS codes
out_request=['fire_type', 'hros', 'hfi'],
backend='auto', threads=4, # omit for auto selection and one thread
)
fire_type, hros, hfi = fbp.runFBP()
Array / raster example
Any spatial input may be a NumPy array (all arrays must share one shape); outputs come back as plain arrays. Missing floating values are NaN; integer outputs have field-specific missing values (see below):
import numpy as np
from cffdrs.cffbps import FBP
fuel_type = np.array([[2, 3, 7], [8, 14, 19]], dtype=np.int8) # 19 = non-fuel
shape = fuel_type.shape
fbp = FBP()
fbp.initialize(
fuel_type=fuel_type, wx_date=20240516,
lat=np.full(shape, 62.2455), long=np.full(shape, -133.8404),
elevation=np.full(shape, 1180.0), slope=np.full(shape, 8.0),
aspect=np.full(shape, 60.0), ws=np.full(shape, 24.0),
wd=np.full(shape, 266.0), ffmc=np.full(shape, 92.0),
bui=np.full(shape, 31.0),
out_request=['hros', 'hfi', 'fire_type'],
)
hros, hfi, fire_type = fbp.runFBP()
For large rasters, use Rust threads=. Python-only
cffdrs.cffbps.python.fbpMultiprocessArray(...) splits (layers, rows, columns)
inputs into worker blocks.
It returns a full raster for each requested field, including fields derived from
scalar inputs.
Running stage by stage (and growth percentiles)
Both backends expose the 23 pipeline steps (invertWindAspect, calcSF, ...,
calcFireIntensityClass) in runFBP() order, plus setParams to inject a value
between steps and getParams to read results. reset() discards computed and injected
values and returns to the initialised inputs; runFBP() always starts from there.
On Rust, intermediate arrays that no later step needs are freed, so request what you
want to read afterwards in out_request:
fbp = FBP()
fbp.initialize(fuel_type=2, wx_date=20240516, lat=62.2, long=-133.8, elevation=1180,
slope=8, aspect=60, ws=24, wd=266, ffmc=92, bui=31,
out_request=['fmc', 'hros'])
fbp.invertWindAspect(); fbp.calcSF(); fbp.calcISZ(); fbp.calcFMC()
fmc = fbp.getParams(['fmc'])[0] # inspect, or override with fbp.setParams({'fmc': ...})
fbp.calcISI_RSI_BE(); fbp.calcROS()
hros = fbp.getParams(['hros'])[0]
In Python and Rust, initialize(..., d0=..., dj=..., fmc=...) (or set_override, setParams, calcFMC(...)) override the
calculated foliar moisture quantities: a value you give is used by every later runFBP until you replace
it, clear it with None, or call initialize again; anything you do not give is calculated. A given fmc
also gives the matching foliar moisture effect (fme), and NaN or masked cells are missing values.
If the other inputs each have one value, a multi-cell override supplied to
initialize can define the raster shape. Multiple override arrays must have
broadcast-compatible dimensions, and later overrides must broadcast to the
established grid shape.
In an override array, a negative value (please use -1) asks for that cell to be calculated while the other cells
take your values: fmc=[95, -1, 110] gives the cell 0 and 2 values and calculates cell 1 when calcFMC (or runFBP)
runs. A negative scalar is the same as None. Until calcFMC runs, calculated cells of fmc and fme are NaN (nothing
is calculated for you when you change a value: run the stages yourself). Other inputs are not given a calculate value.
CuPy accepts d0 and dj rasters at initialization and uses the supplied day values directly.
Missing data must be masked. The package only knows masked cells (np.ma arrays) and NaN as missing; a nodata value
such as -999 is an ordinary number. Mask it before initialize, for example np.ma.masked_equal(arr, -999) or
rasterio's src.read(1, masked=True). Negative ws, ffmc, bui, pc, pdf and gfl are set to 0, so an unmasked
-999 gives a plausible-looking wrong result.
The fuel grid mask applies to every dataset. Valid codes are 1–20 and 30–32. A cell whose fuel is masked or invalid is missing in every
input and override, so its outputs are as for an invalid fuel with all other inputs missing (floats NaN, fire_type 0,
fi_class -99, dj 0, and fuel_type 0). Non-fuel (19) and water (20) are valid codes and are not masked.
initialize(..., percentile_growth=p) takes a percentile (0-100) of the rate-of-spread
distribution of the Han & Braun (2014) model, not a percent change: 50 (the default)
is the unadjusted ROS, and for example 95 scales surface-fire ROS by about 4.6x.
Available outputs
out_request accepts any of the names in cffdrs.cffbps.valid_outputs — including
final outputs (hros, hfi, fire_type, cfb, tfc, fi_class, …) and
intermediates (isi, wsv, raz, sfc, fmc, csfi, rso, be, …).
Output contract
runFBP() and getParams(names) return a list in requested order. Array exports
are plain numpy.ndarray, never masked arrays. Most computed floats are
float64; retained integer inputs (ws, wd, ffmc, bui), integer d0/nd
and injected results can preserve their dtype. Prepared array fuel is normally
int8; scalar fuel mixed with arrays can retain int64. fire_type and
fi_class arrays are int64 (masked values 0 and -99 respectively). dj is
int64 when complete, float64 with NaN when an override is missing. Masked
and invalid fuel cells export code 0. Missing values follow each
field's dependencies, not a blanket mask of every output, with one exception: fuel
consumption (ffc, wfc, sfc, cfc, tfc) follows the spread, so it is 0 where the head
rate of spread is 0 (for example D-2 with BUI below 70) and NaN where it is NaN.
All-scalar inputs export Python scalars. Legacy masked/non-modeled cases can
export floating zero even for nominal integer fields; missing explicit dates
export NaN. With raster inputs, a scalar fuel code applies to every cell.
Rust expands every result to the full grid shape. Python can keep scalar inputs
and fields derived from them at (1,) and has legacy 0-d export differences.
See the detailed output contract
for these measured exceptions.
Experimental GPU backend
An experimental CuPy (GPU) variant of the FBP model lives at
cffdrs.cffbps.cupy. Install the optional gpu extra (needs a
CUDA-capable environment):
pip install "cffdrs-fire[gpu]"
# On CUDA, prefer the version-matched wheel instead, e.g.:
# pip install cupy-cuda12x
# pip install cupy-cuda13x
# If CuPy fails with "Failed to find CUDA headers", add the CUDA component extra:
# pip install "cupy-cuda13x[ctk]"
The CuPy backend was last run on one NVIDIA RTX 5090 (CUDA 13.3, Python 3.14, cupy-cuda13x[ctk]
14.2); no other GPU, CUDA version or platform has been tried.
from cffdrs.cffbps.cupy import FBP # requires cupy + CUDA
To reuse a CuPy model, edit its fuel_type array in place or use setParams
to replace it. Pass a fuel change and any required weather changes together
in one setParams call. Array updates can broadcast to the existing grid.
The next runFBP() recomputes spread, consumption, and intensity for the
current fuels and inputs.
Experimental GPU backend. Legacy fuels retain the older CuPy implementation and its missing-data conventions. CuPy defaults to
float32. The Cheney grass and wheat models are checked against the same ConPyro fixtures as the CPU backends.
Fire Weather Index System (cffdrs.cffwis)
The ten FWI functions accept scalar or array inputs and use the selected package engine. Direct imports from cffdrs.cffwis.python and cffdrs.cffwis.rust select an implementation explicitly.
from cffdrs import cffwis
ffmc = cffwis.dailyFFMC(ffmc0=85, temp=15, rh=50, wind=10, precip=0)
dmc = cffwis.dailyDMC(dmc0=6, temp=15, rh=50, precip=0, month=6)
dc = cffwis.dailyDC(dc0=15, temp=15, precip=0, month=6)
isi = cffwis.dailyISI(wind=10, ffmc=ffmc)
bui = cffwis.dailyBUI(dmc=dmc, dc=dc)
fwi = cffwis.dailyFWI(isi=isi, bui=bui)
Hourly FFMC (Van Wagner 1977 / Alexander et al. 1984) is available via
cffwis.hourlyFFMC, and the Lawson diurnal interpolation via
cffwis.diurnalFFMC_lawson / cffdrs.diurnal_ffmc_lawson.
Validation
FBP outputs are validated against the published test cases in Wotton, Alexander & Taylor (2009), Updates and revisions to the 1992 Canadian Forest Fire Behavior Prediction System (all 20 reference cases; fire type 20/20, core metrics within cross-implementation rounding). The test suite locks all 54 outputs to golden snapshots on both the scalar and array code paths, compared at float32 precision so that last-bit libm/BLAS differences between platforms do not fail the tests. The golden, missing-input and unit suites also run against the Rust backend, and a bit-level oracle pins the scalar Rust core.
Development
Development requires Python 3.11+ (3.11-3.14), uv, and Rust 1.78 or newer
(rustup stable works; CI also builds with 1.78). The main
project uses Maturin, so syncing the environment builds cffdrs._rust alongside
the editable Python package:
git clone https://github.com/gagreene/cffdrs.git
cd cffdrs
uv sync --extra test --extra dev # editable mixed Python/Rust install + tooling
uv run --no-sync python -m pytest tests -q -p no:cacheprovider # both backends
uv run --no-sync ruff check src/ tests/cffbps # lint
uv run --no-sync mypy # type-check the equation core
cargo test --manifest-path rust/Cargo.toml -p cffdrs-fire
uv run --no-sync python tools/compare_backends.py # Python-vs-Rust differences
After a Rust-only change, rebuild the extension with
uv sync --reinstall-package cffdrs-fire --extra test --extra dev.
The Python distribution version comes from rust/crates/cffdrs-py/Cargo.toml;
update that crate version when preparing a release tag. The pure Rust core has
its own version in rust/crates/cffdrs-fire/Cargo.toml because it may be consumed
independently by Rust applications.
Existing golden fixtures are the behavior-preservation oracle. Do not regenerate
them to accommodate a refactor. Releases are published by the
release workflow (a v* tag publishes to PyPI); version tags and publication require owner authorization.
Contributing
Read docs/CONTRIBUTION_PROCEDURES.md before opening a pull request: it
covers branch routing (all version changes go through pre_release, then a release PR into master), commit rules, the
local checks and large tests that are recorded in every pull request, and the rules for numerical changes.
Tests are run locally and never automatically on a schedule.
License
MIT — see LICENSE. © 2024 Gregory A. Greene.
Metadata
Release files for cffdrs-fire 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cffdrs_fire-0.4.1.tar.gz | 1.0 MB | With provenance | Details for cffdrs_fire-0.4.1.tar.gz |
Built distributions (wheels)
Total release size: 4.5 MB
Release files / cffdrs_fire-0.4.1.tar.gz
| Download URL | cffdrs_fire-0.4.1.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eda07b32158b1283b4c38f41c8027842e6699abe7aa233fce1d9cf2df7251d9d
|
|
BLAKE2b-256 checksum How to use checksums |
d6fc7920eae793e10e8bbdc9d321c2cb3018a5753f6401393d711296133de7f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / cffdrs_fire-0.4.1-cp311-abi3-win_arm64.whl
| Download URL | cffdrs_fire-0.4.1-cp311-abi3-win_arm64.whl |
|---|---|
| Size | 465.3 kB |
| Tags | CPython 3.11 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
f0177908ef1048a446ce0aa763a75ee01aa4eaf13123457a7a18b8806bc33fcd
|
|
BLAKE2b-256 checksum How to use checksums |
c128a6acc3d407031186e4da0b8fb41deb2edd4708ebbfcc803aa601f43baa1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / cffdrs_fire-0.4.1-cp311-abi3-win_amd64.whl
| Download URL | cffdrs_fire-0.4.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 484.1 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f2e351e90b6b358ecf84a2192c1559ade6a83b7fd549767c1bd9e0b489d62d81
|
|
BLAKE2b-256 checksum How to use checksums |
dec69ff8cfcf339fe0655b3a71be4f5d3c06b0d64fcf0b46b969b21c9c9f88b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / cffdrs_fire-0.4.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | cffdrs_fire-0.4.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 655.3 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
50762d46f423bdc3e82abc24581f16d7c261cfab468f33ba1bd30ceb6e210e39
|
|
BLAKE2b-256 checksum How to use checksums |
0bbf05e0e30db0e38a2be4a5302e9e5c221c387f238248f8e4dbc9fdd1762812
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / cffdrs_fire-0.4.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | cffdrs_fire-0.4.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 640.7 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
d86ec1d963adaabdd04a8ca590255f8ed3df5d83581e6e829e9d9210c4a1e3d3
|
|
BLAKE2b-256 checksum How to use checksums |
4ee05ffc45b9c780728bdaca93981bb15d4f3e06f80fb4e36004a88a5db58890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / cffdrs_fire-0.4.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | cffdrs_fire-0.4.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 589.2 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
01106f109ad87121412021cb0d11e6541499feeffad1e5679af486d674c612b1
|
|
BLAKE2b-256 checksum How to use checksums |
5315a66d5617f7afe957ef7ce4ebb41896775ab3d4dadab9edf1ff932aabe50c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / cffdrs_fire-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | cffdrs_fire-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 602.4 kB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
e58e785f985213cfd7902c2f9e0e6258c36c7911118f25aa381689c16ddecc60
|
|
BLAKE2b-256 checksum How to use checksums |
6f01218885b4b60048a52c19216d28356c18bb5e1d4a3f97fc22968a01688826
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for cffdrs-fire 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for cffdrs_fire-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.