CSV Weather Data
- Source:
buem/weather/from_csv.py
For single-building runs, BuEM loads pre-extracted weather data from a CSV file rather than processing the full COSMO-REA6 grid.
CsvWeatherData
Reads CSV files with hourly columns:
T — air temperature [°C]
GHI — global horizontal irradiance [W/m²]
DNI — direct normal irradiance [W/m²]
DHI — diffuse horizontal irradiance [W/m²]
DNI Reconstruction
NWP models store DNI as \((GHI - DHI) / \cos(\theta_z)\). Near the horizon \(\cos(\theta_z) \to 0\), producing unphysical spikes (> 4 000 W/m² observed).
reconstruct_dni_from_ghi() applies pvlib’s DISC decomposition
(Iqbal 1983) to re-derive DNI from GHI. The result is capped at
extraterrestrial irradiance (1 316–1 413 W/m² seasonal). DHI is then
back-computed as \(DHI = GHI - DNI \cos(\theta_z)\).
Caching
Processed data is stored as a .feather file next to the source CSV,
avoiding the 2–3 s pvlib computation on repeated imports.
Default Weather File
BuEM ships with COSMO_Year__ix_390_650.csv — a representative weather
year extracted from the COSMO-REA6 reanalysis for Loenen, Netherlands.