The seasonal_weather criterion attaches per-tree annual DWD-derived weather
context to every tree without contributing to the rule-based drought-risk
score. It is a neutral feature carrier for the AutoML workflow and provides
six seasonal variables for the active feature_reference_year:
precip_may_oct_mmprecip_nov_apr_mmtemp_mean_may_oct_cet0_may_oct_mmp_et0_ratio_may_octp_et0_ratio_anomaly_may_octSince issue #213 (plan block F, 2026-08-30), the values are spatially
resolved per tree (nearest 1 km DWD grid cell) instead of a single city-wide
value. Because the criterion is configured with weight 0.0, it does not
change the static drought-risk result. Its purpose is to make the weather
context available per tree in pipeline outputs and downstream ML datasets.
Location:
Processing steps:
tree_id; trees missing from the CSV keep
NaN (no city-wide fallback).project.neutral_score.If the CSV is missing or the target year does not exist in the file, the
criterion returns neutral scores and NaN extras.
data/derived/ml/tree_seasonal_weather.csvThe build script resolves the nearest 1 km grid cell for every tree (cKDTree in UTM 32N) and aggregates per tree and year:
pr)pr)tas)et0, kg m-2 == mm)precip_may_oct_mm / et0_may_oct_mm
(decision D15; replaces the older P / (T + 10) formulation). This is the
standard aridity index (AI = P/PET, UNCCD), not the De Martonne index.p_et0_ratio_may_oct minus the 1991-2020
per-cell climatology (data/derived/ml/p_et0_climatology_1991_2020.parquet,
built by scripts/ml/build_p_et0_climatology.py). Negative values mark a
drier/hotter season than the long-term mean. NaN when the climatology file
is absent.Only years with a complete May–October season (184 days) are written, so the maximum year in the CSV is the last complete weather year. The script is incremental: re-running it only adds years that are not in the output yet.
Typical configuration:
inputs:
seasonal_weather:
path: "data/derived/ml/tree_seasonal_weather.csv"
criteria:
- name: "seasonal_weather"
weight: 0.0
params:
path: "data/derived/ml/tree_seasonal_weather.csv"
Per-tree outputs in extras:
precip_may_oct_mmprecip_nov_apr_mmtemp_mean_may_oct_cet0_may_oct_mmp_et0_ratio_may_octp_et0_ratio_anomaly_may_octMetadata includes:
feature_reference_yearok or no_data)Important interpretation notes:
et0_may_oct_mm (unshaded reference ET0, season sum) is a
different quantity from the daily, SVF/shade-corrected ET0 computed in the
SWBM. There is no leakage: ML features are past season aggregates, the SWBM
state is current and separated in the cascade (stage 2 vs. stage 3).