Add EPW scenario generation: paper/paper.md
Browse files- paper/paper.md +45 -4
paper/paper.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
## Abstract
|
| 6 |
|
| 7 |
-
Campus-scale microclimate variability — driven by buildings, vegetation, and surface materials — directly impacts outdoor thermal comfort and building energy demand, yet remains difficult to characterise with sparse weather observations or expensive computational fluid dynamics simulations. We present a variational autoencoder (VAE) approach for learning compact weather embeddings from a dense network of 40 weather stations deployed across the National University of Singapore campus (~2 km²), recording six meteorological variables at hourly resolution for one full year. The model compresses multivariate weather observations into a 6-dimensional latent space with high reconstruction fidelity (R² > 0.99 for all thermally relevant variables), and we evaluate the resulting embeddings across six downstream tasks: (1) spatial interpolation to unmeasured locations (air temperature MAE = 0.39°C for held-out stations), (2) temporal forecasting that outperforms persistence baselines at 6–15 hour horizons (up to 41% forecast skill for temperature), (3) unsupervised discovery of four distinct microclimate zones, (4) anomaly detection identifying 5% of hours as meteorologically unusual with strong association to storm events, (5) rolling 24-hour future prediction with positive skill across most of the diurnal cycle, and (6) spatial interpolation of Universal Thermal Climate Index (UTCI) at unmeasured locations (MAE = 1.23°C), demonstrating that the embedding preserves thermal comfort information despite never being trained on it. The NUS-40 dataset and trained model are publicly released as a campus-scale dense weather monitoring benchmark. Learned weather embeddings offer a practical middle ground between physics-based simulation and raw sensor data for building science applications.
|
| 8 |
|
| 9 |
**Keywords:** campus microclimate, weather embeddings, variational autoencoder, spatial interpolation, weather forecasting, anomaly detection, urban climate, tropical weather stations, thermal comfort, UTCI
|
| 10 |
|
|
@@ -28,6 +28,8 @@ We propose using a **variational autoencoder (VAE)** to learn such representatio
|
|
| 28 |
|
| 29 |
3. **Six downstream evaluations** showing that the same embeddings — with no retraining or task-specific changes — can be used for spatial interpolation, temporal forecasting, microclimate clustering, anomaly detection, multi-step future prediction, and outdoor thermal comfort mapping via UTCI.
|
| 30 |
|
|
|
|
|
|
|
| 31 |
---
|
| 32 |
|
| 33 |
## 2. Related Work
|
|
@@ -129,6 +131,10 @@ All downstream tasks use the trained VAE without modification — only the embed
|
|
| 129 |
|
| 130 |
**Thermal comfort mapping (Eval 6):** Universal Thermal Climate Index (UTCI; Bröde et al., 2012) is computed at all 40 stations from measured air temperature, humidity, wind speed, and global solar radiation. Mean radiant temperature — required for UTCI but not directly measured — is estimated from global solar radiation using the solar gain method (Thorsson et al., 2007): solar position from pvlib (Holmgren et al., 2018), irradiance decomposition via Erbs et al. (1982), and MRT delta from the pythermalcomfort library (Tartarini and Schiavon, 2020). Wind speed is adjusted from 2 m measurement height to the 10 m reference height required by UTCI using a log-law wind profile. The same five stations held out in Eval 1 are held out here. A linear probe (Ridge regression) is trained to predict UTCI from the 6-d embedding on training stations, then applied to embeddings averaged from 5-nearest-neighbour training stations to interpolate UTCI at the held-out locations. A raw-variable baseline — averaging the raw weather observations from the same 5 neighbours, then computing UTCI from the averaged values — provides a direct comparison.
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
---
|
| 133 |
|
| 134 |
## 5. Results
|
|
@@ -302,6 +308,40 @@ This finding has practical implications: for thermal comfort mapping specificall
|
|
| 302 |
|
| 303 |
For practical campus comfort mapping, the raw k-NN baseline remains the most accurate and interpretable tool (MAE = 0.80°C). The contribution of the embedding approach is different: it validates that the learned representation contains thermal comfort information, and the dimensional analysis reveals which modes of weather variation carry that information. This supports the embedding's use in applications where raw variables are unavailable or where the embedding is the only transferable representation (e.g., cross-campus transfer learning, privacy-preserving data sharing).
|
| 304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
|
| 306 |
|
| 307 |
---
|
|
@@ -326,7 +366,7 @@ The dimensional analysis (Table 7) adds nuance: d = 4 embeddings outperform d =
|
|
| 326 |
|
| 327 |
### 6.2 Practical Implications for Building Science
|
| 328 |
|
| 329 |
-
**Site-specific weather files
|
| 330 |
|
| 331 |
**Evidence-based outdoor comfort zoning.** The four microclimate zones discovered by clustering (Eval 3) provide a data-driven basis for campus master planning. Rather than relying on expert intuition or expensive CFD studies, campus planners could use the embedding-based zoning to identify areas requiring shading structures, wind corridors, or additional vegetation for thermal comfort improvement.
|
| 332 |
|
|
@@ -357,9 +397,10 @@ We introduced the NUS-40 dataset — 40 hourly weather stations spanning one yea
|
|
| 357 |
- **Unsupervised clustering** that discovers four spatially coherent microclimate zones without land-use data;
|
| 358 |
- **Anomaly detection** that identifies storm events and sensor faults from reconstruction error alone;
|
| 359 |
- **Rolling 24-hour prediction** with positive skill across most of the diurnal cycle;
|
| 360 |
-
- **Thermal comfort interpolation** at unmeasured locations (UTCI MAE = 1.23°C), demonstrating that the embedding preserves thermal comfort information it was never trained on
|
|
|
|
| 361 |
|
| 362 |
-
The embedding approach requires no task-specific architecture — the same 6-dimensional vector serves all
|
| 363 |
|
| 364 |
The NUS-40 dataset, trained model weights, embeddings, and all evaluation code are publicly available at https://huggingface.co/citysyntaxlab/campus-weather to support reproducibility and encourage further research on dense urban weather monitoring.
|
| 365 |
|
|
|
|
| 4 |
|
| 5 |
## Abstract
|
| 6 |
|
| 7 |
+
Campus-scale microclimate variability — driven by buildings, vegetation, and surface materials — directly impacts outdoor thermal comfort and building energy demand, yet remains difficult to characterise with sparse weather observations or expensive computational fluid dynamics simulations. We present a variational autoencoder (VAE) approach for learning compact weather embeddings from a dense network of 40 weather stations deployed across the National University of Singapore campus (~2 km²), recording six meteorological variables at hourly resolution for one full year. The model compresses multivariate weather observations into a 6-dimensional latent space with high reconstruction fidelity (R² > 0.99 for all thermally relevant variables), and we evaluate the resulting embeddings across six downstream tasks: (1) spatial interpolation to unmeasured locations (air temperature MAE = 0.39°C for held-out stations), (2) temporal forecasting that outperforms persistence baselines at 6–15 hour horizons (up to 41% forecast skill for temperature), (3) unsupervised discovery of four distinct microclimate zones, (4) anomaly detection identifying 5% of hours as meteorologically unusual with strong association to storm events, (5) rolling 24-hour future prediction with positive skill across most of the diurnal cycle, and (6) spatial interpolation of Universal Thermal Climate Index (UTCI) at unmeasured locations (MAE = 1.23°C), demonstrating that the embedding preserves thermal comfort information despite never being trained on it. We further demonstrate that the VAE's continuous latent space enables generation of physically coherent extreme weather scenarios — including heatwave and urban heat island intensification — as EnergyPlus Weather (EPW) files for building energy simulation, a capability unavailable to classical spatial interpolation methods. The NUS-40 dataset and trained model are publicly released as a campus-scale dense weather monitoring benchmark. Learned weather embeddings offer a practical middle ground between physics-based simulation and raw sensor data for building science applications.
|
| 8 |
|
| 9 |
**Keywords:** campus microclimate, weather embeddings, variational autoencoder, spatial interpolation, weather forecasting, anomaly detection, urban climate, tropical weather stations, thermal comfort, UTCI
|
| 10 |
|
|
|
|
| 28 |
|
| 29 |
3. **Six downstream evaluations** showing that the same embeddings — with no retraining or task-specific changes — can be used for spatial interpolation, temporal forecasting, microclimate clustering, anomaly detection, multi-step future prediction, and outdoor thermal comfort mapping via UTCI.
|
| 30 |
|
| 31 |
+
4. **Extreme scenario EPW generation** demonstrating that the VAE's latent space can produce physically coherent heatwave and urban heat island weather files for building energy simulation — a generative capability that classical interpolation methods lack.
|
| 32 |
+
|
| 33 |
---
|
| 34 |
|
| 35 |
## 2. Related Work
|
|
|
|
| 131 |
|
| 132 |
**Thermal comfort mapping (Eval 6):** Universal Thermal Climate Index (UTCI; Bröde et al., 2012) is computed at all 40 stations from measured air temperature, humidity, wind speed, and global solar radiation. Mean radiant temperature — required for UTCI but not directly measured — is estimated from global solar radiation using the solar gain method (Thorsson et al., 2007): solar position from pvlib (Holmgren et al., 2018), irradiance decomposition via Erbs et al. (1982), and MRT delta from the pythermalcomfort library (Tartarini and Schiavon, 2020). Wind speed is adjusted from 2 m measurement height to the 10 m reference height required by UTCI using a log-law wind profile. The same five stations held out in Eval 1 are held out here. A linear probe (Ridge regression) is trained to predict UTCI from the 6-d embedding on training stations, then applied to embeddings averaged from 5-nearest-neighbour training stations to interpolate UTCI at the held-out locations. A raw-variable baseline — averaging the raw weather observations from the same 5 neighbours, then computing UTCI from the averaged values — provides a direct comparison.
|
| 133 |
|
| 134 |
+
**Thermal comfort mapping (Eval 6):** Universal Thermal Climate Index (UTCI; Bröde et al., 2012) is computed at all 40 stations from measured air temperature, humidity, wind speed, and global solar radiation. Mean radiant temperature — required for UTCI but not directly measured — is estimated from global solar radiation using the solar gain method (Thorsson et al., 2007): solar position from pvlib (Holmgren et al., 2018), irradiance decomposition via Erbs et al. (1982), and MRT delta from the pythermalcomfort library (Tartarini and Schiavon, 2020). Wind speed is adjusted from 2 m measurement height to the 10 m reference height required by UTCI using a log-law wind profile. The same five stations held out in Eval 1 are held out here. A linear probe (Ridge regression) is trained to predict UTCI from the 6-d embedding on training stations, then applied to embeddings averaged from 5-nearest-neighbour training stations to interpolate UTCI at the held-out locations. A raw-variable baseline — averaging the raw weather observations from the same 5 neighbours, then computing UTCI from the averaged values — provides a direct comparison.
|
| 135 |
+
|
| 136 |
+
**Extreme scenario generation (§5.8):** Latent directions corresponding to individual weather variables are identified via linear regression from the 6-d embedding to each observed variable. Weather scenarios are generated by shifting the full year of campus-mean embeddings along these directions (or combinations thereof), calibrating the shift magnitude to achieve a target perturbation, decoding back to weather space, and converting to EnergyPlus Weather (EPW) format. Derived EPW fields (dew point, radiation components, sky cover) are computed from the six decoded variables using standard formulas (Magnus, Erbs et al. 1982, Martin-Berdahl). Three scenarios are generated: a baseline (observed campus-mean), a heatwave (+2°C), and an urban heat island intensification (+2°C with 23% wind reduction).
|
| 137 |
+
|
| 138 |
---
|
| 139 |
|
| 140 |
## 5. Results
|
|
|
|
| 308 |
|
| 309 |
For practical campus comfort mapping, the raw k-NN baseline remains the most accurate and interpretable tool (MAE = 0.80°C). The contribution of the embedding approach is different: it validates that the learned representation contains thermal comfort information, and the dimensional analysis reveals which modes of weather variation carry that information. This supports the embedding's use in applications where raw variables are unavailable or where the embedding is the only transferable representation (e.g., cross-campus transfer learning, privacy-preserving data sharing).
|
| 310 |
|
| 311 |
+
### 5.8 Application: Extreme Scenario Weather File Generation
|
| 312 |
+
|
| 313 |
+
A unique capability of the VAE — unavailable to classical spatial interpolation methods such as IDW or kriging — is the generation of physically coherent extreme weather scenarios. Because the VAE maps weather observations to a continuous, regularised latent space, we can manipulate the latent representation to produce weather states that were never observed during the training year, while preserving the cross-variable correlations learned from real data.
|
| 314 |
+
|
| 315 |
+
**Method.** We identify latent directions corresponding to individual meteorological variables using linear regression from the 6-d embedding to each variable. The regression coefficient vector for variable $v$ defines a direction in latent space along which $v$ changes most, with all other variables shifting in their naturally correlated patterns. To generate a scenario, we shift the entire year's campus-mean embeddings along a chosen direction, calibrate the shift magnitude via binary search to achieve a target perturbation (e.g., +2°C), and decode the shifted embeddings back to weather space. The decoded values are clipped to physical bounds and converted to EnergyPlus Weather (EPW) format with derived fields (dew point via the Magnus formula, radiation decomposition via the Erbs model, sky cover from clearness index, and infrared radiation via the Martin-Berdahl model).
|
| 316 |
+
|
| 317 |
+
We generate three EPW files:
|
| 318 |
+
|
| 319 |
+
**Baseline.** Campus-mean weather from the 40 imputed station observations for 2025 — a site-specific weather file that reflects the actual microclimate measured on campus, as opposed to the standard airport-based TMY (Typical Meteorological Year) files commonly used in building energy simulation.
|
| 320 |
+
|
| 321 |
+
**Heatwave (+2°C).** The campus-mean embeddings are shifted along the temperature direction in latent space, calibrated so the annual mean air temperature increases by exactly 2.0°C. Because the VAE has learned that higher temperatures correlate with lower humidity and higher solar radiation in Singapore's climate, the heatwave scenario produces a self-consistent set of perturbations across all six variables (Table 8).
|
| 322 |
+
|
| 323 |
+
**Urban Heat Island (UHI) Intensification (+2°C, −23% wind).** A combined shift along the temperature direction and against the wind speed direction simulates the effect of increased building density: warming due to reduced nocturnal cooling and anthropogenic heat, combined with reduced ventilation from urban canyon geometry. Both scenarios produce the same +2°C temperature increase, but with physically distinct signatures in other variables.
|
| 324 |
+
|
| 325 |
+
**Table 8: Scenario comparison — annual means**
|
| 326 |
+
|
| 327 |
+
| Variable | Baseline | Heatwave | Δ | UHI | Δ |
|
| 328 |
+
|---|---|---|---|---|---|
|
| 329 |
+
| Air temperature (°C) | 28.6 | 30.8 | +2.0 | 30.8 | +2.0 |
|
| 330 |
+
| Relative humidity (%) | 80.5 | 73.1 | −7.2 | 73.4 | −6.8 |
|
| 331 |
+
| Wind speed (m/s) | 0.65 | 0.58 | −0.07 | 0.40 | −0.25 |
|
| 332 |
+
| Atmospheric pressure (hPa) | 1006.4 | 1006.2 | −0.4 | 1006.4 | −0.2 |
|
| 333 |
+
| Global radiation (W/m²) | 141 | 241 | +100 | 230 | +89 |
|
| 334 |
+
|
| 335 |
+
The temperature shift is uniform across the diurnal cycle (±0.3°C variation from the 2.0°C mean, Table 8), reflecting the VAE's observation-level architecture which does not model temporal dynamics. A sequence-aware model might produce diurnally varying perturbations — for instance, stronger nocturnal warming under UHI conditions — which would be a natural extension of this work.
|
| 336 |
+
|
| 337 |
+
**Physical consistency.** The cross-variable correlations in both scenarios are physically reasonable. Higher temperatures produce lower relative humidity (consistent with the Clausius-Clapeyron relationship at approximately constant specific humidity), slightly higher solar radiation (consistent with reduced cloud cover during heat events in Singapore), and minimal pressure change. The UHI scenario additionally reduces wind speed by 23%, consistent with the wind-sheltering effect of dense urban morphology (Oke et al., 2017).
|
| 338 |
+
|
| 339 |
+
**EPW validation.** All three files pass validation via pvlib's EPW reader (8,760 hours, 35 fields, correct location metadata). Temperature, humidity, radiation, and wind values fall within physically realistic bounds for tropical conditions. The files are directly usable in EnergyPlus, TRNSYS, or any simulation tool that accepts EPW input.
|
| 340 |
+
|
| 341 |
+
The generated EPW files are released alongside the dataset at https://huggingface.co/citysyntaxlab/campus-weather, enabling building energy researchers to evaluate cooling load sensitivity to heatwave and urbanisation scenarios using site-specific, multivariate-consistent weather data rather than simple uniform temperature offsets applied to airport TMY files.
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
|
| 345 |
|
| 346 |
|
| 347 |
---
|
|
|
|
| 366 |
|
| 367 |
### 6.2 Practical Implications for Building Science
|
| 368 |
|
| 369 |
+
**Site-specific weather files and extreme scenario generation.** Building energy simulation tools (EnergyPlus, TRNSYS) require hourly weather files for the specific building location. Currently, these are typically sourced from the nearest airport — often 10–20 km away and unrepresentative of the local microclimate. The spatial interpolation capability demonstrated here (Eval 1) offers an alternative: with a dense baseline network in place, a building designer could generate a site-specific weather file for any location on campus by decoding the interpolated embedding. For temperature and humidity — the primary drivers of cooling load in tropical climates — this approach achieves sub-degree accuracy. Beyond baseline weather, the VAE's latent space enables generation of extreme scenario EPW files (§5.8) where all variables shift together in physically consistent patterns. This is a qualitative advance over the standard practice of applying uniform temperature offsets to TMY files, which disrupts cross-variable correlations and cannot model scenario-specific changes in wind, humidity, or radiation.
|
| 370 |
|
| 371 |
**Evidence-based outdoor comfort zoning.** The four microclimate zones discovered by clustering (Eval 3) provide a data-driven basis for campus master planning. Rather than relying on expert intuition or expensive CFD studies, campus planners could use the embedding-based zoning to identify areas requiring shading structures, wind corridors, or additional vegetation for thermal comfort improvement.
|
| 372 |
|
|
|
|
| 397 |
- **Unsupervised clustering** that discovers four spatially coherent microclimate zones without land-use data;
|
| 398 |
- **Anomaly detection** that identifies storm events and sensor faults from reconstruction error alone;
|
| 399 |
- **Rolling 24-hour prediction** with positive skill across most of the diurnal cycle;
|
| 400 |
+
- **Thermal comfort interpolation** at unmeasured locations (UTCI MAE = 1.23°C), demonstrating that the embedding preserves thermal comfort information it was never trained on;
|
| 401 |
+
- **Extreme scenario EPW generation** producing physically coherent heatwave (+2°C) and urban heat island intensification weather files where temperature, humidity, wind, and radiation shift together consistently — a generative capability unavailable to classical interpolation.
|
| 402 |
|
| 403 |
+
The embedding approach requires no task-specific architecture — the same 6-dimensional vector serves all applications. For building science practitioners, this offers a lightweight, reusable representation of campus microclimate that supports energy simulation, comfort assessment, extreme scenario analysis, and facilities monitoring from a single trained model.
|
| 404 |
|
| 405 |
The NUS-40 dataset, trained model weights, embeddings, and all evaluation code are publicly available at https://huggingface.co/citysyntaxlab/campus-weather to support reproducibility and encourage further research on dense urban weather monitoring.
|
| 406 |
|