Skip to main content
< All Topics
Print

Weather-Disease Modeling

name: weather-disease-modeling

description: Model plant disease risk from weather data using phytopathology thresholds for common garden diseases (late blight, powdery mildew, downy mildew, bacterial spot). Covers temperature/humidity/leaf-wetness duration thresholds, Growing Degree Day calculations, disease severity indices, and forecast-based alerts. Use when building disease risk prediction, calculating GDD accumulation, implementing weather-based spray advisories, or creating disease pressure dashboards.

Weather-Disease Modeling

Instructions

Disease Risk Threshold Reference

Implement disease models using these established phytopathology thresholds:

Late Blight (Phytophthora infestans)

  1. Blitecast model (modified):
  • Track consecutive hours where: temperature 45–80°F AND relative humidity ≥ 90%
  • Low risk: < 6 consecutive hours meeting conditions
  • Moderate risk: 6–10 consecutive hours
  • High risk: > 10 consecutive hours
  • Severity values: accumulate daily; trigger spray advisory at severity value ≥ 18
  1. Rain interaction: any rainfall event > 0.1 inches during a high-humidity period escalates risk by one level

Powdery Mildew (Erysiphales)

  1. Favorable conditions:
  • Temperature: 60–80°F (optimum 70°F)
  • Relative humidity: 40–100% (spore germination does NOT require free water)
  • Inhibited by: temperatures > 95°F, direct rainfall washing spores off leaves
  1. Risk calculation:
  • Count hours per day in the 60–80°F range with RH > 50%
  • Low risk: < 6 hours/day
  • Moderate risk: 6–12 hours/day
  • High risk: > 12 hours/day for 3+ consecutive days

Downy Mildew (Peronosporaceae)

  1. Favorable conditions:
  • Temperature: 50–75°F (optimum 65°F)
  • Leaf wetness duration: ≥ 6 hours
  • High humidity (> 85%) combined with cool nights
  1. Risk triggers:
  • Night temperature drops below 65°F AND morning leaf wetness persists > 4 hours
  • 3+ consecutive days meeting conditions = high risk

Bacterial Spot (Xanthomonas)

  1. Favorable conditions:
  • Temperature: 75–86°F
  • Leaf wetness: ≥ 12 hours (rain-splashed transmission)
  • Wind-driven rain dramatically increases spread
  1. Risk calculation:
  • Track days with: max temp > 75°F AND any rain event AND leaf wetness > 8 hours
  • High risk: 2+ qualifying days in a 5-day window

Growing Degree Day (GDD) Calculations

  1. Standard formula:

   GDD = max(0, ((T_max + T_min) / 2) - T_base)
  1. Base temperatures by crop:
  • Tomato: 50°F
  • Pepper: 55°F
  • Corn: 50°F
  • Squash/Cucumber: 50°F
  • Lettuce/Greens: 40°F
  1. Accumulation tracking:
  • Sum GDD daily from a defined biofix date (transplant date or emergence date)
  • Use accumulated GDD to predict: days to flowering, days to fruit set, days to maturity
  1. Upper threshold cutoff: cap T_max at 86°F for most vegetables (growth slows above this)

Disease Severity Index (DSI)

  1. Composite scoring (0–100 scale):

   DSI = (w1 × late_blight_score) + (w2 × powdery_mildew_score) +
         (w3 × downy_mildew_score) + (w4 × bacterial_spot_score)

Default weights: w1=0.35, w2=0.20, w3=0.25, w4=0.20

  1. Individual disease scores (0–100):
  • Map each disease’s multi-day risk accumulation to a 0–100 scale
  • Low risk days contribute 0–2 points
  • Moderate risk days contribute 3–5 points
  • High risk days contribute 6–10 points
  1. Decay function: reduce accumulated score by 10% per day when conditions are unfavorable
  2. Alert thresholds:
  • DSI 0–25: Green (normal monitoring)
  • DSI 26–50: Yellow (increase scouting frequency)
  • DSI 51–75: Orange (preventive treatment recommended)
  • DSI 76–100: Red (active treatment required)

Weather Data Integration

  1. Required data points (minimum hourly):
  • Temperature (°F or °C)
  • Relative humidity (%)
  • Precipitation (inches or mm)
  • Wind speed (mph or km/h)
  • Leaf wetness duration (hours) — estimate from dew point if sensor unavailable
  1. Leaf wetness estimation when no sensor:
  • If RH ≥ 90% AND temperature is within 3°F of dew point → assume leaf wetness
  • Duration = consecutive hours meeting the above condition
  1. Data sources:
  • Weather API (OpenWeatherMap, Visual Crossing, Tomorrow.io)
  • Local weather station (Davis Instruments, Ambient Weather)
  • National Weather Service API (forecast.weather.gov) for free forecasts
  1. Forecast integration:
  • Pull 7-day hourly forecast data
  • Run disease models on forecast data to produce predictive risk scores
  • Label forecast-based scores distinctly from observed-data scores

Implementation Steps

  1. Define crop profiles: map each crop to its susceptible diseases and GDD base temperature
  2. Build weather data pipeline: fetch hourly observations and forecasts, normalize units
  3. Implement individual disease models: one function per disease returning a 0–100 score
  4. Calculate composite DSI: weighted sum with configurable weights per crop
  5. Generate alerts: compare DSI to thresholds, produce user-facing advisory messages
  6. Store historical data: retain daily DSI values for season-over-season comparison
  7. Visualize: time-series chart of DSI with color-coded zones and forecast projection

Inputs Required

  • Geographic location (latitude/longitude or zip code for weather data)
  • Crops being grown (for disease susceptibility mapping and GDD base temps)
  • Weather data source API credentials
  • Planting/transplant dates (for GDD accumulation start)
  • Optional: local weather station data for higher accuracy

Output Format

Disease Risk Advisory


{
  "date": "2026-04-14",
  "location": { "lat": 33.749, "lon": -84.388 },
  "data_source": "observed" | "forecast",
  "gdd": {
    "daily": 12.5,
    "accumulated": 342.0,
    "base_temp": 50,
    "crop": "tomato"
  },
  "disease_scores": {
    "late_blight": { "score": 35, "level": "yellow", "trend": "rising" },
    "powdery_mildew": { "score": 12, "level": "green", "trend": "stable" },
    "downy_mildew": { "score": 48, "level": "yellow", "trend": "rising" },
    "bacterial_spot": { "score": 8, "level": "green", "trend": "falling" }
  },
  "composite_dsi": 28,
  "dsi_level": "yellow",
  "advisory": "Increase scouting frequency. Downy mildew pressure building — monitor morning leaf wetness closely.",
  "recommended_actions": [
    "Scout for downy mildew symptoms on lower leaves",
    "Consider preventive copper spray if forecast shows continued cool wet nights"
  ]
}

Anti-Patterns

  • Using daily averages instead of hourly data — disease models depend on consecutive-hour thresholds; daily averages mask critical periods
  • Ignoring leaf wetness duration — humidity alone is insufficient; leaf wetness duration is the key driver for most fungal diseases
  • Hardcoding disease weights — different crops have different susceptibility profiles; weights must be configurable
  • Treating forecast scores the same as observed scores — always label the data source; forecast-based scores carry more uncertainty
  • Skipping the decay function — without decay, scores only go up, creating permanent false alarms
  • Using a single weather data point per day — hourly granularity is the minimum for accurate disease modeling
  • Alerting without actionable recommendations — a risk score without treatment guidance creates anxiety, not action
Table of Contents