MeteoSynth: A Python Package for Non-Parametric Stochastic Weather Series Generation in Renewable Energy and Building Performance Simulations
Evaluating renewable energy system performance and building energy demand typically relies on single-year historical profiles or Typical Meteorological Years (TMYs). However, deterministic weather series fail to capture inter-annual variability, extreme operational events, and provide distributions information necessary for performance assessment, control optimization, and Global Sensitivity Analysis (GSA). To address these limitations, this paper introduces MeteoSynth, an open-source Python package designed for high-throughput, non-parametric generation of physically consistent synthetic time series for individual environmental variables. The package is variable-agnostic: any continuous hourly series can be modelled once its physical support and units are declared. This paper, like the package defaults, focuses on solar irradiance, air temperature, and wind speed. These three were chosen mainly because their physical constraints differ: temperature may take negative values, wind speed is non-negative, and irradiance is non-negative and also collapses to a degenerate zero state every night. Together they show how the generator handles each of these cases in general, and the limitations that remain are also examined. A second, practical reason is that PVGIS supplies all three. Each variable is simulated independently, with multi-variable coupling reserved for future releases. MeteoSynth models diurnal weather dynamics using time-inhomogeneous first-order Markov chains governed by two-dimensional Kernel Density Estimation (2D KDE). To ensure physical validity and calendar continuity, the framework incorporates supports features such as prevention of non-physical negative values with minimal domain distortion, a robust degenerate state classification engine to handle zero-variance night-time solar irradiance, a climatological circular rolling-window calendar (366-day calendar) that eliminates New Year boundary jumps while accommodating leap years, and date-aligned cross-midnight transition models ensuring multi-day series continuity. It additionally offers optional integration with the PVGIS database, a user-friendly API supporting both rapid monthly subsetting and high-accuracy rolling-window training, and an optimized ensemble engine capable of generating thousands of synthetic weather realizations in a single calendar walk; such that generating a single synthetic year and large ensembles of 1,000 to 100,000 years takes virtually the same amount of execution time due to internal model-reuse optimizations.
Authors
- Nikolaos Papadakis (ORCID: https://orcid.org/0000-0001-5909-5559)
Publication Details
- Journal
- Preprints.org
- Published
- 2026-10-27
- DOI
- https://doi.org/10.20944/preprints202610.2636.v1
- Primary Topic
- Building Energy and Comfort Optimization
- Type
- preprint