Create QUIC-Fire simulation inputs
You are viewing in-progress documentation for v2. Switch to the stable version for the current production release.
QUIC-Fire is a 3-D fire–atmosphere model. To simulate fire spread through custom fuels and terrain it reads a small set of gridded binary input files:
| File | Quantity | Units |
|---|---|---|
treesrhof.dat | fuel bulk density | kg/m³ |
treesmoist.dat | fuel moisture | fraction (mass water / mass dry fuel) |
treesfueldepth.dat | surface fuel-bed depth | m |
topo.dat | terrain elevation | m |
treesss.dat | fuel particle size (2 / SAVR) | m |
By the end of this tutorial you’ll have produced every one of those files for a real landscape — about one square kilometer of the Blue Mountain Recreation Area near Missoula, Montana — from national data sources, with roads masked out of the fuels.
You build a handful of
grids (surface fuel, canopy fuel, terrain, moisture), land each of them
on the same 2 m lattice — some are built there directly, the LANDFIRE
surface fuels are resampled onto it — and then a single QUIC-Fire export
stitches them together into the .dat bundle. Every grid is created with
one POST and finishes asynchronously, so the rhythm of the whole tutorial
is create → poll until completed → use the id in the next call. In the
Python SDK the poll is resource.wait(), and the Python tabs form one
continuous script — you import and authenticate once in Step 1, then each
step keeps the object it just made and passes it to the next.
Prerequisites
Section titled “Prerequisites”-
An API key. Create one in the FastFuels web app under your account settings. Set it once here and it propagates to every code block on the page: my-api-key. The SDK reads it via
ff.set_api_key(...)or theFASTFUELS_API_KEYenvironment variable. -
curlwithunzipfor the final download, or Python with the FastFuels SDK —pip install fastfuels-sdk(v0.26.0+ for v2).
You create everything else, including the domain, as you go.
Step 1 — Create a domain
Section titled “Step 1 — Create a domain”A domain is the georeferenced extent everything else hangs off. POST a
GeoJSON FeatureCollection to /domains. pad_to_resolution: 2 snaps the
domain’s bounding box out to a clean 2 m grid — the cell size QUIC-Fire will
use — so every grid you build lands on the same lattice.
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [-114.09545796676623, 46.8324794598619], [-114.11217537297199, 46.8324794598619], [-114.11217537297199, 46.82496749915157], [-114.09545796676623, 46.82496749915157], [-114.09545796676623, 46.8324794598619] ] ] } } ], "name": "Blue Mountain Recreation Area", "description": "Approximately 1 square kilometer near Missoula, Montana.", "pad_to_resolution": 2}'import fastfuels_sdk.v2 as ff
ff.set_api_key("my-api-key")
domain = ff.Domain.from_geojson( { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": {}, "geometry": {"type": "Polygon", "coordinates": [[ [-114.09545796676623, 46.8324794598619], [-114.11217537297199, 46.8324794598619], [-114.11217537297199, 46.82496749915157], [-114.09545796676623, 46.82496749915157], [-114.09545796676623, 46.8324794598619], ]]}, }], }, name="Blue Mountain Recreation Area", description="Approximately 1 square kilometer near Missoula, Montana.", pad_to_resolution=2,){ "bbox": [720226.0, 5189762.0, 721534.0, 5190646.0], "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [ [ [720226.0, 5189762.0], [721534.0, 5189762.0], [721534.0, 5190646.0], [720226.0, 5190646.0], [720226.0, 5189762.0] ] ] }, "properties": { "name": "domain" } } ], "name": "Blue Mountain Recreation Area", "description": "Approximately 1 square kilometer near Missoula, Montana.", "crs": { "type": "name", "properties": { "name": "EPSG:32611" } }, "pad_to_resolution": 2.0, "id": "your-domain-id", "created_on": "2026-11-03T21:32:55.360840", "modified_on": "2026-11-03T21:32:55.360840"}The API reprojects your WGS84 polygon into the appropriate UTM zone
(here EPSG:32611) and reports the padded bbox. Record the domain id —
every call below hangs off it: your-domain-id.
Step 2 — Add a road feature
Section titled “Step 2 — Add a road feature”Roads carry no fuel, so we’ll mask them out of the surface fuels and remove
trees that fall on them. The reusable geometry for that is a feature —
here, the road network pulled from OpenStreetMap. POST to
/features/road/osm:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/features/road/osm' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "OSM roads"}'road = ff.features.create_road_feature_from_osm(domain, name="OSM roads")The 201 mints a feature id — record it: your-road-feature-id.
Poll it to completed (the road extractor runs asynchronously):
curl -X 'GET' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/features/your-road-feature-id' \ -H 'accept: application/json' \ -H 'api-key: my-api-key'road.wait(){ "id": "your-road-feature-id", "domain_id": "your-domain-id", "type": "road", "name": "OSM roads", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:32:55.507167Z", "modified_on": "2026-11-03T21:32:56.336094Z", "source": { "extent_buffer_m": 0.0, "description": "OpenStreetMap road network", "product": "osm" }, "georeference": { "crs": "EPSG:32611", "bounds": [720226.0, 5189762.0, 721534.0, 5190646.0] }, "error": null, "tags": []}On this domain the extractor returns 36 road polygons. It widens each OSM
centerline into a footprint by its road class. The count is the
total_features at
/domains/your-domain-id/features/your-road-feature-id/data/metadata.
Step 3 — Build the surface fuel grid
Section titled “Step 3 — Build the surface fuel grid”Surface fuels come from LANDFIRE in three moves: fetch the categorical FBFM40 fuel-model grid with the urban non-burnable class removed, look up the continuous loads each fuel model implies — still on LANDFIRE’s native 30 m lattice — and resample those loads onto the domain’s 2 m fire lattice, masking roads out of the result.
Fetch the FBFM40 grid, removing the urban class
Section titled “Fetch the FBFM40 grid, removing the urban class”LANDFIRE maps the road corridor through this domain as NB1 (urban
non-burnable) — a blocky, 30 m-wide version of a road that is really a few
meters across. remove_non_burnable drops those pixels and fills them with
the most frequent neighboring burnable fuel model, because we’ll re-cut the
road at its true footprint from OSM in the last move. No alignment is
given, so the grid comes back at the source’s native 30 m:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/fbfm40/landfire' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "FBFM40 fuel model (LANDFIRE 2024, NB1 removed)", "version": "2024", "remove_non_burnable": ["NB1"]}'fbfm = ff.grids.create_fuel_model_grid_from_landfire_fbfm40( domain, version="2024", remove_non_burnable=["NB1"], name="FBFM40 fuel model (LANDFIRE 2024, NB1 removed)",)Record the grid id: your-fbfm40-grid-id. Poll it to completed. Every
grid below is polled the same way, at its own id:
curl -X 'GET' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/your-fbfm40-grid-id' \ -H 'accept: application/json' \ -H 'api-key: my-api-key'fbfm.wait(){ "id": "your-fbfm40-grid-id", "domain_id": "your-domain-id", "name": "FBFM40 fuel model (LANDFIRE 2024, NB1 removed)", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:00.982183Z", "modified_on": "2026-11-03T21:33:03.282271Z", "checksum": "0e46108756ad465c91e2c2bc61537bd9", "source": { "alignment": { "target": "domain", "resolution": null, "method": null }, "name": "landfire", "extent_buffer_cells": 0, "boundary_scatter": null, "product": "fbfm40", "description": "LANDFIRE FBFM40 fuel model codes (Scott-Burgan 40 classification)", "season": null, "version": "2024", "year": 2024, "remove_non_burnable": ["NB1"], "disturbance": null }, "modifications": [], "bands": [ { "key": "fbfm", "name": "Scott & Burgan 40 Fuel Model", "description": "Scott & Burgan 40 fire behavior fuel model code (e.g. GR1, TL3, SH5). Convert to fuel parameters via /grids/lookup/fbfm40.", "type": "categorical", "unit": null, "index": 0, "nodata": 32767, "summary": { "type": "categorical", "count": 1350, "nodata_count": 0, "unique_count": 8 } } ], "georeference": { "crs": "EPSG:32611", "transform": [ 29.49945488757609, 0.0, 720226.0, 0.0, -29.499454887583852, 5190646.9836466275 ], "shape": [30, 45] }, "error": null, "chunks": { "shape": [512, 512], "count": 1, "count_by_axis": { "x": 1, "y": 1 } }, "tags": []}The completed grid’s shape is [30, 45] — a 30 m lattice over the same
extent, and its 1,350 cells now hold only the eight burnable fuel models.
Look up surface loads
Section titled “Look up surface loads”Point the lookup at the completed FBFM grid. bands are the quantities the
QUIC-Fire export needs — fuel_load.fine_dead, fuel_depth, and
savr.fine_dead. The result inherits the source’s 30 m lattice:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Surface fuel loads (FBFM40 lookup)", "source_grid_id": "your-fbfm40-grid-id", "source_band": "fbfm", "bands": ["fuel_load.fine_dead", "fuel_depth", "savr.fine_dead"]}'lookup = ff.grids.create_fuel_grid_from_fbfm40_lookup( fbfm, bands=["fuel_load.fine_dead", "fuel_depth", "savr.fine_dead"], source_band="fbfm", name="Surface fuel loads (FBFM40 lookup)",)lookup.wait(){ "id": "your-lookup-grid-id", "domain_id": "your-domain-id", "name": "Surface fuel loads (FBFM40 lookup)", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:06.485158Z", "modified_on": "2026-11-03T21:33:10.293313Z", "checksum": "2008c7fbbfd64b14bb7b2e55b8bc8afa", "source": { "source_band": "fbfm", "source_grid_checksum": "0e46108756ad465c91e2c2bc61537bd9", "name": "lookup", "source_grid_id": "your-fbfm40-grid-id", "table": "fbfm40", "herbaceous_curing": 0.67 }, "modifications": [], "bands": [ { "key": "fuel_load.fine_dead", "name": "Fine Dead Fuel Load", "description": "Oven-dry mass per unit area of fine dead fuels: 1-hour plus dead herbaceous. Takes the dead 1-hour fuel moisture.", "type": "continuous", "unit": "kg/m**2", "index": 0, "nodata": null, "summary": { "type": "continuous", "count": 1350, "nodata_count": 0, "min": 0.07487255334854126, "max": 1.3001821041107178, "mean": 0.373247585495313, "std": 0.40144771570642535 } }, { "key": "fuel_depth", "name": "Fuel Bed Depth", "description": "Vertical depth of the surface fuel bed.", "type": "continuous", "unit": "m", "index": 1, "nodata": null, "summary": { "type": "continuous", "count": 1350, "nodata_count": 0, "min": 0.09144000709056854, "max": 0.6096000075340271, "mean": 0.3399084429387693, "std": 0.13011642417583014 } }, { "key": "savr.fine_dead", "name": "Fine Dead Surface-Area-to-Volume Ratio", "description": "Load-weighted surface-area-to-volume ratio of 1-hour and dead herbaceous fuels.", "type": "continuous", "unit": "1/m", "index": 2, "nodata": null, "summary": { "type": "continuous", "count": 1350, "nodata_count": 0, "min": 2460.6298828125, "max": 6561.6796875, "mean": 6279.277265625, "std": 282.76837135232984 } } ], "georeference": { "crs": "EPSG:32611", "transform": [ 29.49945488757609, 0.0, 720226.0, 0.0, -29.499454887583852, 5190646.9836466275 ], "shape": [30, 45] }, "error": null, "chunks": { "shape": [512, 512], "count": 1, "count_by_axis": { "x": 1, "y": 1 } }, "tags": []}Record the lookup grid id: your-lookup-grid-id. With the
non-burnable class gone, every one of its cells carries fuel —
fuel_load.fine_dead runs from about 0.07 up to about 1.30 kg/m²
across the eight fuel models.
Resample to the fire lattice, masking roads
Section titled “Resample to the fire lattice, masking roads”The fire grid is 2 m, and the loads are still 30 m steps. Resample re-grids
them onto the domain-anchored 2 m lattice — continuous bands interpolate by
default, so the hard 30 m edges become smooth gradients. The modifications
block rides the same request and zeroes fuel load and depth in any cell a
road touches, cutting the road back into the fuelscape at its real width:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/resample' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Surface fuels at 2 m, roads masked", "source_grid_id": "your-lookup-grid-id", "alignment": { "target": "domain", "resolution": 2 }, "modifications": [ { "conditions": [ {"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-road-feature-id"} ], "actions": [ {"band": "fuel_load.fine_dead", "modifier": "replace", "value": 0}, {"band": "fuel_depth", "modifier": "replace", "value": 0} ] } ]}'# Resample onto the 2 m fire lattice, zeroing fuel on cells that touch a road.surface = lookup.resample( output_resolution_m=2, name="Surface fuels at 2 m, roads masked", modifications=[ ff.mask(road, ["fuel_load.fine_dead", "fuel_depth"], 0, operator="intersects", target="cell"), ],){ "id": "your-surface-grid-id", "domain_id": "your-domain-id", "name": "Surface fuels at 2 m, roads masked", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:11.906315Z", "modified_on": "2026-11-03T21:33:15.246355Z", "checksum": "fa2e97e701694633864708fe5e5fd122", "source": { "alignment": { "target": "domain", "resolution": 2.0, "method": null }, "name": "resample", "source_grid_id": "your-lookup-grid-id", "source_grid_checksum": "2008c7fbbfd64b14bb7b2e55b8bc8afa", "method_overrides": {} }, "modifications": [ { "conditions": [ { "source": "feature", "operator": "intersects", "feature_id": "your-road-feature-id", "buffer_m": null, "target": "cell" } ], "actions": [ { "band": "fuel_load.fine_dead", "modifier": "replace", "value": 0 }, { "band": "fuel_depth", "modifier": "replace", "value": 0 } ] } ], "bands": [ { "key": "fuel_load.fine_dead", "name": "Fine Dead Fuel Load", "description": "Oven-dry mass per unit area of fine dead fuels: 1-hour plus dead herbaceous. Takes the dead 1-hour fuel moisture.", "type": "continuous", "unit": "kg/m**2", "index": 0, "nodata": null, "summary": { "type": "continuous", "count": 289068, "nodata_count": 0, "min": 0.0, "max": 1.3001821041107178, "mean": 0.35611880840568305, "std": 0.35337708459274375 } }, { "key": "fuel_depth", "name": "Fuel Bed Depth", "description": "Vertical depth of the surface fuel bed.", "type": "continuous", "unit": "m", "index": 1, "nodata": null, "summary": { "type": "continuous", "count": 289068, "nodata_count": 0, "min": 0.0, "max": 0.6034020781517029, "mean": 0.32110859163552724, "std": 0.13880610058635293 } }, { "key": "savr.fine_dead", "name": "Fine Dead Surface-Area-to-Volume Ratio", "description": "Load-weighted surface-area-to-volume ratio of 1-hour and dead herbaceous fuels.", "type": "continuous", "unit": "1/m", "index": 2, "nodata": null, "summary": { "type": "continuous", "count": 289068, "nodata_count": 0, "min": 2523.792724609375, "max": 6561.6796875, "mean": 6279.811010696411, "std": 214.99860646619626 } } ], "georeference": { "crs": "EPSG:32611", "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "shape": [442, 654] }, "error": null, "chunks": { "shape": [512, 512], "count": 2, "count_by_axis": { "x": 2, "y": 1 } }, "tags": []}Record the surface grid id: your-surface-grid-id — this resampled grid, not the 30 m lookup, is what the export will read. When it completes, 15,464 of the grid’s 289,068 cells sit at zero, and every one of them is a road-masked cell.
The fine dead fuel load before and after the resample. Left, the lookup on
LANDFIRE’s 30 m cells. Right, the surface grid on the 2 m lattice, with the
15,464 road cells at 0 left unfilled. Most of the domain carries about
0.2 kg/m², and the heavy patches reach 1.3 kg/m².
Step 4 — Build the canopy fuel grid
Section titled “Step 4 — Build the canopy fuel grid”The 3-D canopy is four chained builds: a canopy height model (a raster of vegetation height from NAIP aerial imagery), a tree inventory detected from it (one stem per treetop, with roadside trees removed), a GDAM allometry pass that fills in the morphology a height model can’t see, and a voxel grid that turns those stems into per-cell bulk density, moisture, and SAVR.
Build the canopy height model
Section titled “Build the canopy height model”NAIP imagery is processed by a deep-learning model into a ~0.6 m canopy height surface — fine enough that individual crowns stand out as peaks:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/canopy/naip' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "NAIP CHM"}'chm = ff.grids.create_canopy_height_grid_from_naip_chm(domain, name="NAIP CHM")chm.wait(){ "id": "your-chm-grid-id", "domain_id": "your-domain-id", "name": "NAIP CHM", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:12.043375Z", "modified_on": "2026-11-03T21:33:16.246165Z", "checksum": "b6a351ecaaef46fea8c2481570423af5", "source": { "alignment": { "target": "domain", "resolution": null, "method": null }, "name": "canopy", "extent_buffer_cells": 0, "product": "naip", "description": "NAIP high-resolution canopy height model at ~0.6m resolution (CONUS)", "tile_metadata": { "acquisition_dates": null, "tiles": [ "https://rangeland.ntsg.umt.edu/data/naip-chm/2023/11/m_4611416_nw_11_060_20231019_20240103_chm.tif" ], "tile_count": 1, "native_crs": "EPSG:32611", "tile_source": null } }, "modifications": [], "bands": [ { "key": "chm", "name": "Canopy Height", "description": "Height above ground of the canopy top.", "type": "continuous", "unit": "m", "index": 0, "nodata": null, "summary": { "type": "continuous", "count": 3216975, "nodata_count": 0, "min": 0.0, "max": 32.689998626708984, "mean": 5.950183918105713, "std": 7.25633903389633 } } ], "georeference": { "crs": "EPSG:32611", "transform": [ 0.5997260672151095, 0.0, 720226.0, 0.0, -0.5997260672150779, 5190646.595949142 ], "shape": [1475, 2181] }, "error": null, "chunks": { "shape": [512, 512], "count": 15, "count_by_axis": { "x": 5, "y": 3 } }, "tags": []}Record the grid id: your-chm-grid-id. This domain has no 3DEP lidar, and the NAIP CHM covers the conterminous US. For the other CHM sources, see Generate a tree inventory from a CHM.
Detect trees, removing roadside stems
Section titled “Detect trees, removing roadside stems”Run individual-tree detection over the CHM: the local-maxima filter (lmf)
places one tree at each canopy peak taller than 2 m, and the
modifications rule drops every detected tree within 5 m of a road:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/inventories/tree/chm' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Tree inventory from CHM (trees near roads removed)", "source_chm_grid_id": "your-chm-grid-id", "algorithm": { "name": "lmf", "min_height": 2, "footprint_size": 3 }, "modifications": [ { "conditions": [ {"source": "feature", "operator": "within", "feature_id": "your-road-feature-id", "buffer_m": 5} ], "actions": [ {"modifier": "remove"} ] } ]}'from fastfuels_sdk.v2.client_library.models import StemIsolationLmf
detected = ff.inventories.create_tree_inventory_from_chm_grid( domain, chm, algorithm=StemIsolationLmf(min_height=2, footprint_size=3), modifications=[ff.remove_trees(ff.tree_within(road, buffer_m=5))], name="Tree inventory from CHM (trees near roads removed)",)Record the inventory id: your-chm-inventory-id, and poll it to
completed:
curl -X 'GET' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/inventories/your-chm-inventory-id' \ -H 'accept: application/json' \ -H 'api-key: my-api-key'detected.wait(){ "id": "your-chm-inventory-id", "domain_id": "your-domain-id", "type": "tree", "name": "Tree inventory from CHM (trees near roads removed)", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:17.430247Z", "modified_on": "2026-11-03T21:33:41.105105Z", "checksum": "bacaa9e1c5b74d339b93079e1e0f1cfd", "source": { "algorithm": { "name": "lmf", "footprint_size": 3, "max_height": 120.0, "min_height": 2.0 }, "crown_segmentation": null, "name": "chm", "source_chm_grid_checksum": "b6a351ecaaef46fea8c2481570423af5", "source_chm_grid_id": "your-chm-grid-id" }, "modifications": [ { "conditions": [ { "source": "feature", "operator": "within", "feature_id": "your-road-feature-id", "buffer_m": 5.0 } ], "actions": [ { "modifier": "remove" } ] } ], "treatments": [], "columns": [ { "key": "tree_id", "type": "categorical", "unit": null, "summary": { "type": "categorical", "count": 6983, "null_count": 0, "unique_count": 6983 } }, { "key": "x", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 720226.2998630336, "max": 721533.7026895626, "mean": 720781.1506521687, "std": 368.46958734976954 } }, { "key": "y", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 5189762.299863034, "max": 5190646.296086108, "mean": 5190229.962093476, "std": 252.00382952277783 } }, { "key": "height", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 2.009999990463257, "max": 32.689998626708984, "mean": 14.707112991893494, "std": 6.624547043676027 } } ], "forestry_metrics": null, "georeference": { "crs": "EPSG:32611", "bounds": [720226.0, 5189762.0, 721534.0, 5190646.0] }, "error": null, "tags": []}The completed inventory holds 6,983 trees, the count in each column’s
summary, with those within 5 m of a road already removed. Each tree carries
only tree_id, x, y, and height. See
What a CHM can and cannot tell you.
Fill in morphology with GDAM allometry
Section titled “Fill in morphology with GDAM allometry”Voxelization needs each tree’s dbh, crown_base_height, and
fia_species_code, and a CHM observes none of them. GDAM (a Generalized
Dendro Allometric Model) imputes them, along with crown_ratio, from each
tree’s position and height, and writes a new, completed inventory:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/inventories/tree/allometry/gdam' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Tree inventory completed with GDAM allometry", "source_tree_inventory_id": "your-chm-inventory-id"}'inventory = ff.inventories.create_tree_inventory_with_gdam_allometry( domain, detected, name="Tree inventory completed with GDAM allometry",)inventory.wait(){ "id": "your-inventory-id", "domain_id": "your-domain-id", "type": "tree", "name": "Tree inventory completed with GDAM allometry", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:43.509504Z", "modified_on": "2026-11-03T21:33:47.649954Z", "checksum": "d7884e3bbecc42bbb157b1a0bebe1ba0", "source": { "overwrite": false, "conditioned_columns": [], "name": "gdam", "source_tree_inventory_checksum": "bacaa9e1c5b74d339b93079e1e0f1cfd", "crown_base_height_model": { "name": "gdam" }, "impute_columns": [ "dbh", "crown_ratio", "fia_species_code", "crown_base_height" ], "source_tree_inventory_id": "your-chm-inventory-id" }, "modifications": [], "treatments": [], "columns": [ { "key": "tree_id", "type": "categorical", "unit": null, "summary": { "type": "categorical", "count": 6983, "null_count": 0, "unique_count": 6983 } }, { "key": "x", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 720226.2998630336, "max": 721533.7026895626, "mean": 720781.1506521687, "std": 368.4695873497674 } }, { "key": "y", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 5189762.299863034, "max": 5190646.296086108, "mean": 5190229.962093476, "std": 252.0038295229966 } }, { "key": "height", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 2.009999990463257, "max": 32.689998626708984, "mean": 14.707112991893494, "std": 6.624547043676026 } }, { "key": "dbh", "type": "continuous", "unit": "cm", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 2.31716518632578, "max": 88.15104615804617, "mean": 26.795608254677383, "std": 13.363059688634232 } }, { "key": "crown_ratio", "type": "continuous", "unit": null, "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 0.0074129631951631155, "max": 0.9922495531626199, "mean": 0.574237568533969, "std": 0.19535071356265496 } }, { "key": "fia_species_code", "type": "categorical", "unit": null, "summary": { "type": "categorical", "count": 6983, "null_count": 0, "unique_count": 6 } }, { "key": "crown_base_height", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 6983, "null_count": 0, "min": 0.005612953878541187, "max": 25.94156336037615, "mean": 4.763750052789639, "std": 4.163618210467127 } } ], "forestry_metrics": { "type": "tree", "tree_count": 6983, "basal_area_per_area": 18.524062513597382, "tree_density": 24.440020544259394, "quadratic_mean_diameter": 11.78836681019695, "dominant_species_groups": [ { "spgrpcd": 4, "name": "Pine", "basal_area_share": 0.73234187803586 }, { "spgrpcd": 2, "name": "Douglas-fir", "basal_area_share": 0.26123431655857154 }, { "spgrpcd": 1, "name": "Cedar/larch", "basal_area_share": 0.004653778422011208 }, { "spgrpcd": 10, "name": "Juniper/oak/mesquite", "basal_area_share": 0.001744627130133914 }, { "spgrpcd": 3, "name": "True fir/hemlock", "basal_area_share": 2.5399853423266147e-5 } ] }, "georeference": { "crs": "EPSG:32611", "bounds": [720226.0, 5189762.0, 721534.0, 5190646.0] }, "error": null, "tags": []}Record the new inventory id — this completed inventory, not the raw
detection, is what gets voxelized: your-inventory-id. The Python
example waits for it to complete. With curl, poll it the same way as the
detection. All 6,983 trees come back, each now carrying tree_id, x, y,
and height plus the imputed dbh, crown_ratio, fia_species_code, and
crown_base_height. See
Complete a tree inventory with GDAM allometry
for what’s imputed and what isn’t.
Voxelize the canopy
Section titled “Voxelize the canopy”Turn the stems into a 3-D grid. resolution is 2 m horizontal and 1 m
vertical (the fire grid’s cell size), and bands are exactly the canopy
quantities the export needs. The biomass_source derives foliage bulk
density from National-Scale Volume and Biomass (nsvb) allometric equations:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/voxelize/inventory/tree' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Canopy fuel voxels", "source_inventory_id": "your-inventory-id", "resolution": { "horizontal": 2, "vertical": 1 }, "bands": ["bulk_density.foliage.live", "fuel_moisture.live", "savr.foliage"], "biomass_source": { "type": "allometry", "equations": "nsvb", "components": ["foliage"], "component_states": { "foliage": { "live": 1.0, "dead": 0.0 } } }, "seed": 42}'from fastfuels_sdk.v2.client_library.models import ( AllometryBiomassSource, AllometryBiomassSourceComponentStates, BiomassComponent, BiomassEquations,)
# Voxelization is a method on the completed Inventory, not a grids.create_* call.tree_grid = inventory.voxelize( horizontal_resolution_m=2, vertical_resolution_m=1, bands=["bulk_density.foliage.live", "fuel_moisture.live", "savr.foliage"], biomass_source=AllometryBiomassSource( equations=BiomassEquations.NSVB, components=[BiomassComponent.FOLIAGE], component_states=AllometryBiomassSourceComponentStates.from_dict( {"foliage": {"live": 1.0, "dead": 0.0}}), ), seed=42, name="Canopy fuel voxels",){ "id": "your-tree-grid-id", "domain_id": "your-domain-id", "name": "Canopy fuel voxels", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:48.889066Z", "modified_on": "2026-11-03T21:34:32.188476Z", "checksum": "4340b48e0da74528862892a8c3e10797", "source": { "bands": [ "bulk_density.foliage.live", "fuel_moisture.live", "savr.foliage" ], "input": "inventory", "operation": "voxelize", "biomass_source": { "type": "allometry", "equations": "nsvb", "components": ["foliage"], "component_states": { "foliage": { "dead": 0.0, "live": 1.0 } } }, "crown_geometry_source": { "type": "parametric" }, "crown_profile_model": "purves", "moisture_model": { "live": { "method": "uniform", "value": 100.0 } }, "source_inventory_id": "your-inventory-id", "source_inventory_checksum": "d7884e3bbecc42bbb157b1a0bebe1ba0", "resolution": { "vertical": 1.0, "horizontal": 2.0 }, "entity": "tree", "seed": 42, "max_crown_radius_source": { "type": "allometry" } }, "modifications": [], "bands": [ { "key": "bulk_density.foliage.live", "name": "Live Foliage Bulk Density", "description": "Per-voxel bulk density of live foliage.", "type": "continuous", "unit": "kg/m**3", "index": 0, "nodata": null, "summary": null }, { "key": "fuel_moisture.live", "name": "Live Fuel Moisture", "description": "Moisture content of live canopy fuels (% of oven-dry weight).", "type": "continuous", "unit": "%", "index": 1, "nodata": null, "summary": null }, { "key": "savr.foliage", "name": "Foliage Surface-Area-to-Volume Ratio", "description": "Surface-area-to-volume ratio of foliage.", "type": "continuous", "unit": "1/m", "index": 2, "nodata": null, "summary": null } ], "georeference": { "crs": "EPSG:32611", "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "shape": [33, 442, 654], "z_resolution": 1.0, "z_origin": 0.0 }, "error": null, "chunks": { "shape": [33, 442, 442], "count": 2, "count_by_axis": { "x": 2, "y": 1, "z": 1 } }, "tags": []}Record the canopy grid id: your-tree-grid-id. Its shape is
[33, 442, 654] — 33 vertical layers of 1 m over the 442 × 654 horizontal
grid. That vertical extent becomes the fire grid’s height.
The canopy grid, rendered voxel by voxel over the terrain from Step 5. Each green cube is a 2 × 2 × 1 m cell holding foliage, about 330,000 of them, built from the 6,983 trees. Where the canopy thins, the surface grid carries the fuel.
Step 5 — Build the topography grid
Section titled “Step 5 — Build the topography grid”QUIC-Fire solves a near-surface wind field over the ground before and during
the burn, and terrain shapes both that wind and the way fire moves across
slopes. The simulation reads that ground as an elevation surface (topo.dat).
Pull elevation from USGS 3DEP, aligned to the same 2 m lattice:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/topography/3dep' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Topography (3DEP 10 m)", "source_resolution": 10, "bands": ["elevation"], "alignment": { "target": "domain", "resolution": 2 }}'topography = ff.grids.create_topography_grid_from_3dep( domain, source_resolution_m=10, output_resolution_m=2, bands=["elevation"], name="Topography (3DEP 10 m)",){ "id": "your-topography-grid-id", "domain_id": "your-domain-id", "name": "Topography (3DEP 10 m)", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:49.129029Z", "modified_on": "2026-11-03T21:33:51.265572Z", "checksum": "fe75a2796bb34449b169ad39a2b0113c", "source": { "bands": ["elevation"], "alignment": { "target": "domain", "resolution": 2.0, "method": null }, "name": "3dep", "extent_buffer_cells": 0, "product": "topography", "tile_metadata": { "acquisition_dates": null, "tiles": [ "https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/current/n47w115/USGS_13_n47w115.tif" ], "tile_count": 1, "native_crs": "EPSG:4326", "tile_source": null }, "description": "3DEP topographic data (elevation, slope, aspect)", "source_resolution": 10 }, "modifications": [], "bands": [ { "key": "elevation", "name": "Elevation", "description": "Height above sea level.", "type": "continuous", "unit": "m", "index": 0, "nodata": -999999.0, "summary": { "type": "continuous", "count": 289068, "nodata_count": 0, "min": 957.4439086914062, "max": 1171.71142578125, "mean": 1035.6274880236062, "std": 43.292473865248894 } } ], "georeference": { "crs": "EPSG:32611", "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "shape": [442, 654] }, "error": null, "chunks": { "shape": [512, 512], "count": 2, "count_by_axis": { "x": 2, "y": 1 } }, "tags": []}Record the id: your-topography-grid-id. The elevation band’s summary
runs from about 957 m to 1,172 m. That is the ground surface the fire
grid sits on.
The elevation grid from Step 5, from 957 m in the north-east to 1,172 m in the south-west, with contours every 25 m.
Step 6 — Build the surface moisture grid
Section titled “Step 6 — Build the surface moisture grid”QUIC-Fire reads a surface fuel-moisture field alongside the loads, as a fraction of dry-fuel mass. This tutorial uses one uniform value, 6%:
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/uniform' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Surface fuel moisture (uniform 6%)", "resolution": 2, "bands": [ { "key": "fuel_moisture.1hr", "value": 6.0 } ]}'moisture = ff.grids.create_uniform_grid( domain, resolution_m=2, bands={"fuel_moisture.1hr": 6.0}, name="Surface fuel moisture (uniform 6%)",){ "id": "your-moisture-grid-id", "domain_id": "your-domain-id", "name": "Surface fuel moisture (uniform 6%)", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:49.287624Z", "modified_on": "2026-11-03T21:33:52.162480Z", "checksum": "bc5db50664c24dfaa3e9a16413a195f2", "source": { "bands": [ { "key": "fuel_moisture.1hr", "value": 6.0 } ], "name": "uniform", "resolution": 2.0 }, "modifications": [], "bands": [ { "key": "fuel_moisture.1hr", "name": "1-hour Fuel Moisture", "description": "Moisture content of 1-hour timelag dead surface fuels (% of oven-dry weight).", "type": "continuous", "unit": "%", "index": 0, "nodata": null, "summary": { "type": "continuous", "count": 289068, "nodata_count": 0, "min": 6.0, "max": 6.0, "mean": 6.0, "std": 0.0 } } ], "georeference": { "crs": "EPSG:32611", "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "shape": [442, 654] }, "error": null, "chunks": { "shape": [512, 512], "count": 2, "count_by_axis": { "x": 2, "y": 1 } }, "tags": []}Record the id: your-moisture-grid-id. That’s the last grid — you now have surface fuel, canopy fuel, terrain, and moisture, all on the same 2 m lattice.
Step 7 — Create the QUIC-Fire export
Section titled “Step 7 — Create the QUIC-Fire export”The export binds each physical quantity QUIC-Fire needs to a
{grid_id, band} role, and writes the .dat bundle. Five roles are required: canopy bulk density, canopy moisture,
surface load, surface depth, and surface moisture. topography adds
topo.dat, and the SAVR pair adds treesss.dat.
We leave alignment at its default: the domain-anchored fire grid at 2 m
horizontal cells — the resolution QUIC-Fire recommends — and 1 m vertical
layers, which every grid above already matches.
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/exports/quicfire' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Blue Mountain QUIC-Fire inputs", "canopy_bulk_density": {"grid_id": "your-tree-grid-id", "band": "bulk_density.foliage.live"}, "canopy_moisture": {"grid_id": "your-tree-grid-id", "band": "fuel_moisture.live"}, "canopy_savr": {"grid_id": "your-tree-grid-id", "band": "savr.foliage"}, "surface_fuel_load": {"grid_id": "your-surface-grid-id", "band": "fuel_load.fine_dead"}, "surface_fuel_depth": {"grid_id": "your-surface-grid-id", "band": "fuel_depth"}, "surface_moisture": {"grid_id": "your-moisture-grid-id", "band": "fuel_moisture.1hr"}, "surface_savr": {"grid_id": "your-surface-grid-id", "band": "savr.fine_dead"}, "topography": {"grid_id": "your-topography-grid-id", "band": "elevation"}}'# Wait for the four grids still finishing, then bundle. Each quantity is a# (grid, band) pair.for grid in (surface, tree_grid, topography, moisture): grid.wait()
export = ff.exports.create_quicfire_export( domain, canopy_bulk_density=(tree_grid, "bulk_density.foliage.live"), canopy_moisture=(tree_grid, "fuel_moisture.live"), canopy_savr=(tree_grid, "savr.foliage"), surface_fuel_load=(surface, "fuel_load.fine_dead"), surface_fuel_depth=(surface, "fuel_depth"), surface_moisture=(moisture, "fuel_moisture.1hr"), surface_savr=(surface, "savr.fine_dead"), topography=(topography, "elevation"), name="Blue Mountain QUIC-Fire inputs",){ "id": "your-export-id", "domain_id": "your-domain-id", "name": "Blue Mountain QUIC-Fire inputs", "description": "", "status": "pending", "progress": null, "created_on": "2026-11-03T21:34:36.268748", "modified_on": "2026-11-03T21:34:36.268748", "source": { "name": "quicfire", "domain_id": "your-domain-id", "alignment": { "target": "domain", "dx": 2.0, "dy": 2.0, "dz": 1.0 }, "canopy_bulk_density": { "grid_id": "your-tree-grid-id", "band": "bulk_density.foliage.live" }, "canopy_moisture": { "grid_id": "your-tree-grid-id", "band": "fuel_moisture.live" }, "canopy_savr": { "grid_id": "your-tree-grid-id", "band": "savr.foliage" }, "surface_fuel_load": { "grid_id": "your-surface-grid-id", "band": "fuel_load.fine_dead" }, "surface_fuel_depth": { "grid_id": "your-surface-grid-id", "band": "fuel_depth" }, "surface_moisture": { "grid_id": "your-moisture-grid-id", "band": "fuel_moisture.1hr" }, "surface_savr": { "grid_id": "your-surface-grid-id", "band": "savr.fine_dead" }, "topography": { "grid_id": "your-topography-grid-id", "band": "elevation" }, "rhof_merge": "sum", "moist_merge": "max", "savr_merge": "weighted_avg", "georeference": { "crs": "EPSG:32611", "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "shape": [33, 442, 654], "z_resolution": 1.0, "z_origin": 0.0 } }, "signed_url": null, "expires_on": "2026-11-10T21:34:36.268748", "error": null, "tags": []}The 201 echoes a source.georeference — the exact grid the bundle will be
written on, in the same georeference form the grids carry. Its shape is the
same [33, 442, 654], the transform holds the 2 m cells, and
z_resolution the 1 m layers. The response also mints an export id.
Record it: your-export-id.
Unlike the grids, the export’s lifecycle lives at /exports/{id} (not under
the domain). Poll it there:
curl -X 'GET' \ 'https://api.fastfuels.silvxlabs.com/v2/exports/your-export-id' \ -H 'accept: application/json' \ -H 'api-key: my-api-key'export.wait(){ "id": "your-export-id", "domain_id": "your-domain-id", "name": "Blue Mountain QUIC-Fire inputs", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:34:36.268748Z", "modified_on": "2026-11-03T21:34:56.318211Z", "source": { "rhof_merge": "sum", "alignment": { "target": "domain", "dy": 2.0, "dz": 1.0, "dx": 2.0 }, "name": "quicfire", "georeference": { "z_origin": 0.0, "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "shape": [33, 442, 654], "z_resolution": 1.0, "crs": "EPSG:32611" }, "domain_id": "your-domain-id", "canopy_savr": { "grid_id": "your-tree-grid-id", "band": "savr.foliage" }, "canopy_bulk_density": { "grid_id": "your-tree-grid-id", "band": "bulk_density.foliage.live" }, "savr_merge": "weighted_avg", "canopy_moisture": { "grid_id": "your-tree-grid-id", "band": "fuel_moisture.live" }, "surface_savr": { "grid_id": "your-surface-grid-id", "band": "savr.fine_dead" }, "surface_fuel_depth": { "grid_id": "your-surface-grid-id", "band": "fuel_depth" }, "topography": { "grid_id": "your-topography-grid-id", "band": "elevation" }, "moist_merge": "max", "surface_moisture": { "grid_id": "your-moisture-grid-id", "band": "fuel_moisture.1hr" }, "surface_fuel_load": { "grid_id": "your-surface-grid-id", "band": "fuel_load.fine_dead" } }, "signed_url": "https://storage.googleapis.com/silvx-fastfuels-exports-v2/your-export-id/Blue_Mountain_QUIC-Fire_inputs.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=604800&X-Goog-SignedHeaders=host&X-Goog-Signature=...", "expires_on": "2026-11-10T21:34:36.268748Z", "error": null, "tags": []}When it lands on completed, the response carries a signed_url — a
temporary download link (valid 7 days) for the zipped bundle.
Step 8 — Download and inspect the input files
Section titled “Step 8 — Download and inspect the input files”The completed export carries a signed_url — a temporary link that carries its
own credentials, so no api-key header is needed. In the SDK,
export.to_file(...) follows that link and writes the zip. With curl, copy the
signed_url from the completed response and download it directly:
# The signed URL carries its own credentials, so no api-key header is needed.# It expires after 7 days.curl -L 'paste-signed-download-url' -o quicfire_inputs.zip
unzip quicfire_inputs.zip -d quicfire_inputsls quicfire_inputs# domain.geojson metadata.json topo.dat treesfueldepth.dat# treesmoist.dat treesrhof.dat treesss.datimport zipfile
export.to_file("quicfire_inputs.zip")with zipfile.ZipFile("quicfire_inputs.zip") as archive: archive.extractall("quicfire_inputs") print(archive.namelist())You now have a complete QUIC-Fire input set:
| File | What it holds |
|---|---|
treesrhof.dat | 3-D fuel bulk density (canopy + surface merged at the ground layer) |
treesmoist.dat | 3-D fuel moisture |
treesfueldepth.dat | surface fuel-bed depth (ground layer) |
topo.dat | 2-D terrain elevation |
treesss.dat | 3-D fuel particle size (2 / SAVR) |
metadata.json | the fire-grid dimensions and the export’s provenance |
domain.geojson | the domain footprint, for reference |
The .dat files are Fortran-order binary arrays on the fire grid. Their
dimensions are recorded in metadata.json:
{ "format": "quicfire", "exporter_version": "1", "completed_on": "2026-11-03T21:34:53.074961+00:00", "fire_grid": { "nx": 654, "ny": 442, "nz": 33, "dx": 2.0, "dy": 2.0, "dz": 1.0, "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "z_origin": 0.0, "crs": "EPSG:32611" }, "export_id": "your-export-id", "export_name": "Blue Mountain QUIC-Fire inputs", "source": { "moist_merge": "max", "canopy_savr": { "band": "savr.foliage", "grid_id": "your-tree-grid-id" }, "surface_savr": { "band": "savr.fine_dead", "grid_id": "your-surface-grid-id" }, "alignment": { "target": "domain", "dy": 2.0, "dx": 2.0, "dz": 1.0 }, "domain_id": "your-domain-id", "topography": { "band": "elevation", "grid_id": "your-topography-grid-id" }, "savr_merge": "weighted_avg", "rhof_merge": "sum", "canopy_bulk_density": { "band": "bulk_density.foliage.live", "grid_id": "your-tree-grid-id" }, "surface_moisture": { "band": "fuel_moisture.1hr", "grid_id": "your-moisture-grid-id" }, "canopy_moisture": { "band": "fuel_moisture.live", "grid_id": "your-tree-grid-id" }, "surface_fuel_load": { "band": "fuel_load.fine_dead", "grid_id": "your-surface-grid-id" }, "name": "quicfire", "georeference": { "transform": [2.0, 0.0, 720226.0, 0.0, -2.0, 5190646.0], "z_origin": 0.0, "crs": "EPSG:32611", "z_resolution": 1.0, "shape": [33, 442, 654] }, "surface_fuel_depth": { "band": "fuel_depth", "grid_id": "your-surface-grid-id" } }}To run the simulation, place these files in your QUIC-Fire case directory
alongside an input deck — the .inp files that set the winds, ignition,
run length, and outputs, plus a gridlist and rasterorigin.txt describing
the fire grid. The
quicfire-tools Python package
writes all of that.
Set up a QUIC-Fire simulation with quicfire-tools
walks the exact deck for this export.
The whole pipeline in one script
Section titled “The whole pipeline in one script”Everything above, start to finish — create the domain, extract roads, build
the surface, canopy, terrain, and moisture grids, export, and download the
.dat bundle. Set your API key and run it:
"""Build a complete QUIC-Fire input set with the FastFuels v2 SDK.
Creates a domain, masks roads, builds surface + canopy fuels and terrain,then exports the QUIC-Fire .dat files. `resource.wait()` replaces the manualpoll loop; `export.to_file()` replaces the manual signed-URL download."""import zipfile
import fastfuels_sdk.v2 as fffrom fastfuels_sdk.v2.client_library.models import ( StemIsolationLmf, AllometryBiomassSource, AllometryBiomassSourceComponentStates, BiomassComponent, BiomassEquations,)
ff.set_api_key("my-api-key")
# 1. Domain — Blue Mountain Recreation Area, padded to a clean 2 m lattice.domain = ff.Domain.from_geojson( { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [[ [-114.09545796676623, 46.8324794598619], [-114.11217537297199, 46.8324794598619], [-114.11217537297199, 46.82496749915157], [-114.09545796676623, 46.82496749915157], [-114.09545796676623, 46.8324794598619], ]], }, }], }, name="Blue Mountain Recreation Area", pad_to_resolution=2,)
# 2. Road feature from OpenStreetMap (reused as a mask below).road = ff.features.create_road_feature_from_osm(domain, name="OSM roads")road.wait()
# 3. Surface fuels: FBFM40 -> per-model load lookup -> resample to 2 m, roads zeroed.fbfm = ff.grids.create_fuel_model_grid_from_landfire_fbfm40( domain, version="2024", remove_non_burnable=["NB1"], name="FBFM40 fuel model (LANDFIRE 2024, NB1 removed)",)fbfm.wait()lookup = ff.grids.create_fuel_grid_from_fbfm40_lookup( fbfm, bands=["fuel_load.fine_dead", "fuel_depth", "savr.fine_dead"], name="Surface fuel loads (FBFM40 lookup)",)lookup.wait()surface = lookup.resample( output_resolution_m=2, name="Surface fuels at 2 m, roads masked", modifications=[ ff.mask(road, ["fuel_load.fine_dead", "fuel_depth"], 0, operator="intersects", target="cell"), ],)
# 4. Canopy fuels: NAIP CHM -> detection (trees near roads removed) -> GDAM -> voxels.chm = ff.grids.create_canopy_height_grid_from_naip_chm(domain, name="NAIP CHM")chm.wait()detection = ff.inventories.create_tree_inventory_from_chm_grid( domain, chm, algorithm=StemIsolationLmf(min_height=2, footprint_size=3), modifications=[ff.remove_trees(ff.tree_within(road, buffer_m=5))], name="Tree inventory from CHM (trees near roads removed)",)detection.wait()inventory = ff.inventories.create_tree_inventory_with_gdam_allometry( domain, detection, name="Tree inventory completed with GDAM allometry",)inventory.wait()tree_grid = inventory.voxelize( horizontal_resolution_m=2, vertical_resolution_m=1, bands=["bulk_density.foliage.live", "fuel_moisture.live", "savr.foliage"], biomass_source=AllometryBiomassSource( equations=BiomassEquations.NSVB, components=[BiomassComponent.FOLIAGE], component_states=AllometryBiomassSourceComponentStates.from_dict( {"foliage": {"live": 1.0, "dead": 0.0}}), ), seed=42, name="Canopy fuel voxels",)
# 5. Terrain (3DEP elevation) and a uniform surface-moisture grid.topography = ff.grids.create_topography_grid_from_3dep( domain, source_resolution_m=10, output_resolution_m=2, bands=["elevation"], name="Topography (3DEP 10 m)",)moisture = ff.grids.create_uniform_grid( domain, resolution_m=2, bands={"fuel_moisture.1hr": 6.0}, name="Surface fuel moisture (uniform 6%)",)for grid in (surface, tree_grid, topography, moisture): grid.wait()
# 6. Bundle everything into QUIC-Fire .dat files.export = ff.exports.create_quicfire_export( domain, canopy_bulk_density=(tree_grid, "bulk_density.foliage.live"), canopy_moisture=(tree_grid, "fuel_moisture.live"), canopy_savr=(tree_grid, "savr.foliage"), surface_fuel_load=(surface, "fuel_load.fine_dead"), surface_fuel_depth=(surface, "fuel_depth"), surface_moisture=(moisture, "fuel_moisture.1hr"), surface_savr=(surface, "savr.fine_dead"), topography=(topography, "elevation"), name="Blue Mountain QUIC-Fire inputs",)export.wait()
# 7. Download and unzip the QUIC-Fire input bundle.export.to_file("quicfire_inputs.zip")with zipfile.ZipFile("quicfire_inputs.zip") as archive: archive.extractall("quicfire_inputs") print(archive.namelist())# -> ['treesrhof.dat', 'treesmoist.dat', 'treesfueldepth.dat', 'topo.dat',# 'treesss.dat', 'metadata.json', 'domain.geojson']Next steps
Section titled “Next steps”- Run the simulation yourself. Set up a QUIC-Fire simulation with quicfire-tools builds the tested input deck, runs QUIC-Fire, and reads the outputs back as numpy arrays. The Blue Mountain case study explains the figures produced from one such run and their limitations.
- Tune the fuelscape. Thin fuel along road shoulders instead of zeroing it, or remove only large trees near roads — see Remove surface fuel under roads, water and buildings and Remove trees with features. Mask water the same way with a water feature, from Create road and water features.
- Swap a data source. Build the tree inventory
from TreeMap
or from your own tree list
instead of a CHM. A TreeMap inventory samples stems — understory included —
from the closest-matching FIA field plots, and it arrives with all the
columns voxelization needs (
dbh,crown_base_height, species), so it skips the GDAM step and goes to the voxelizer. An uploaded tree list keeps whatever columns your file had — run GDAM first if it’s only positions and heights, exactly as in Step 4. For the surface, a DUET surface grid replaces the LANDFIRE loads with a litter and grass pattern built from the canopy. - Inspect a grid before exporting — fetch and stream the grid data to check values cell by cell.
- Change the horizontal fire grid. Pass an explicit
alignmentto the export for a coarser horizontal simulation (for example,dx: 4anddy: 4). Every role grid must still match the resulting lattice. Keepdz: 1when using QUIC-Fire 6.1.1’s FastFuels input convention.