🍄 Model Methodology

How foraging.ninja predicts where porcini, morel, chanterelle, matsutake, and oyster mushrooms grow in Colorado — the data sources, mathematical approach, and peer-reviewed literature behind every score.

Transparency note: We describe the model architecture and factor categories in full. The specific factor weights, score calibration constants, and implementation code are proprietary. This page cites the primary literature that informed every major modeling decision.

1. Mathematical Framework

Each 250 m × 250 m grid cell receives a suitability score via a log-linear weighted geometric mean across up to 40 independent ecological factors:

scoreraw = exp( Σk (wk / Σw) · ln(fk + ε) )

score = clip( scoreraw2.5 / anchorWard, 0, 1 )

Why geometric mean? Unlike an arithmetic mean, the geometric mean is ruthless about missing requirements: if any critical factor scores near zero (wrong elevation, wrong tree species, wrong soil pH), the geometric mean collapses the total score toward zero. This shatters "red blobs" into precise hotspots.

Hard-zero vetoes: Four factors can force the score to exactly 0.0 regardless of all other factors: absence of ectomycorrhizal host trees, outside the species' elevation bracket, below the species' minimum summer precipitation threshold, and above the species' maximum summer temperature threshold.

Ward CO anchor normalisation: The score is divided by the raw score computed at Ward, Colorado (40.080°N, 105.542°W) — the site of a well-documented August 2021 B. rubriceps flush event with multiple iNaturalist records. This means Ward in peak conditions scores exactly 1.0 (100), and all other cells are expressed relative to that historical benchmark.

2. Factor Categories

All 40 factors are grouped into six categories. Weights are calibrated against iNaturalist field observations using logistic regression and then hand-tuned against published literature. Factor weights sum to 1.0.

Host & Stand Structure (~24% weight)
  • LANDFIRE EVT host species identity
  • FIA species composition (IDW)
  • FIA stand basal area (Bonet 2012)
  • Forest age / stand maturity (EVH)
  • Forest edge distance
Climate (~18% weight)
  • Summer precipitation (Jul+Aug+Sep)
  • September trigger pulse
  • Winter snowpack (Oct–Mar)
  • Summer max temperature
  • August dewpoint
  • Diurnal temperature range
Terrain & Hydrology (~16% weight)
  • Elevation zone
  • Topographic Wetness Index
  • Topographic Position Index
  • N-facing aspect (northness)
  • Heat Load Index
  • Stream proximity
Soils (~16% weight)
  • Soil pH 0–30 cm (POLARIS)
  • Soil organic carbon
  • Bulk density
  • Hydraulic conductivity (Ksat)
  • Cation exchange capacity
  • Soil porosity
Remote Sensing (~9% weight)
  • NDVI summer amplitude (MODIS)
  • Land surface temperature (MODIS)
  • Canopy cover % (LANDFIRE)
  • Snow disappearance DOY (MODIS)
Disturbance & Succession (~8% weight)
  • Post-fire age bonus (MTBS/NIFC)
  • Bark/spruce beetle kill (USFS IDS)
  • Forest loss year (Global Forest Change)
  • SNODAS April SWE (snowpack)

3. NaN Transparency Masking

Before any math runs, cells are hard-excluded and rendered as fully transparent (NaN) if any of these conditions fire:

1Elevation bracket — below 2,440 m (8,000 ft) or above 3,660 m (12,000 ft)
2No forest canopy — NLCD Tree Canopy Cover < 20% (catches plains, crops, barren rock, cities, ski runs)
3TIGER Census urban areas — all Census-designated urban boundaries + 500 m buffer (prevents color leaking onto suburbs)
4NLCD developed classes — NLCD 21/22/23/24 (developed open/low/medium/high) + 500 m buffer
5Hydrologic exclusion — TWI > 23.5 flags open water, wetlands, and standing water features
6LANDFIRE EVT non-forest veto — cells with non-forest/non-woodland EVT codes (agriculture, grassland, shrubland, barren) receive NaN regardless of elevation or canopy

4. Live Conditions Channels

The static habitat map shows long-term average conditions. The live conditions overlay multiplies the static score by a daily channel vector, updated each morning:

1
SNOTEL 30-day precipitation anomaly
Source: NRCS AWDB station network; 30-day cumulative vs. 5-yr climatology
2
PRISM gridded 30-day antecedent precipitation
Source: PRISM Climate Group, Oregon State University; daily 4km grids
3
PRISM trigger window (5–10 day rain + temperature drop)
Source: PRISM daily 4km; captures the specific rainfall event + cool-down that triggers fruiting body initiation (Pilz & Molina 2002)
4
SNOTEL soil temperature at 8″ depth (14-day mean)
Source: NRCS AWDB; mycorrhizal hyphal growth requires soil temps 7–18°C (Nara 2006)
5
MODIS NDVI 8-day anomaly
Source: NASA MODIS MOD13Q1 vs. 5-year climatology; canopy greenness proxy for photosynthate availability to fungal partners
6
Open-Meteo 7-day surface soil temperature forecast
Source: Open-Meteo ERA5-Land + IFS model; 0 cm depth
7
Open-Meteo 7-day cumulative precipitation forecast
Source: Open-Meteo ECMWF IFS; 7-day total forecast for upcoming fruiting window
8
Seasonal day-of-year fruiting curve
Empirical curve derived from 15-year iNaturalist + GBIF observation phenology; varies by elevation band

5. Score Tier Thresholds

Tier boundaries are calibrated to the empirical score distribution of all forest cells within the elevation bracket (2,440–3,660 m, TCC ≥ 20%):

6. Academic Citations

Hall IR & Yun W (2008)
The porcini mushroom: geographical distribution and ecology
Mycologia 100(4). DOI: 10.3852/08-006
Pilz D & Molina R (2002)
Commercial harvests of edible mushrooms from the forests of the Pacific Northwest United States: issues, management, and monitoring for sustainability
Forest Ecology and Management. DOI: 10.1016/S0378-1127(01)00527-8
Büntgen U et al. (2012)
Drought-induced decline in observed truffle harvest
Nature Climate Change 2:827–829. DOI: 10.1038/nclimate1733
Bonet JA et al. (2012)
Immediate effects of prescribed burnings on soil macrofungal sporocarp production
Forest Ecology and Management. DOI: 10.1016/j.foreco.2012.01.005
Águeda B et al. (2010)
Moderately ectomycorrhizal host species improve porcini mushroom yield
Forest Ecology and Management. DOI: 10.1016/j.foreco.2009.11.028
Nara K (2006)
Ectomycorrhizal networks and seedling establishment during early primary succession
New Phytologist 169(1). DOI: 10.1111/j.1469-8137.2005.01613.x
Daly C et al. (2008)
Physiographically sensitive mapping of climatological temperature and precipitation across the conterminous United States
Int. J. Climatology 28(15). DOI: 10.1002/joc.1688
Rollins MG (2009)
LANDFIRE: A nationally consistent vegetation, wildland fire, and fuel assessment
Int. J. Wildland Fire 18(3). DOI: 10.1071/WF08088
Ficetola GF et al. (2020)
How to make species distribution models predictions more realistic
Journal of Biogeography. DOI: 10.1111/jbi.13830