Weather#

Sources, loaders, and resampling utilities for solar irradiance and temperature time series.

Local weather loading and PVGIS/NSRDB TMY helpers use the core install. Open-Meteo historical fetching requires breos[weather].

Loading from local files#

breos.weather.load_weather(location[, ...])

Smart weather loading: scan local files for matching weather data.

breos.weather.parse_weather_filename(filename)

Parse a weather filename following the convention: {location}_{type}_{yearstart}_{yearend}_{source}.csv

breos.weather.read_epw_file(filepath[, ...])

Read an EPW (EnergyPlus Weather) file and return standardized weather DataFrame.

Fetching from external APIs#

breos.weather.fetch_tmy_weather_data(...[, ...])

Fetch Typical Meteorological Year (TMY) weather data from PVGIS.

breos.weather.fetch_tmy_nsrdb(latitude, ...)

Fetch TMY data from NREL's NSRDB (National Solar Radiation Database) via pvlib.

breos.weather.fetch_weather_data(latitude, ...)

Fetch historical weather data from the Open-Meteo API.

Resampling#

Convert between hourly and 15-minute resolutions. The 15-minute path uses Makima interpolation on clearness indices rather than raw irradiance so sunrise / sunset transitions stay physically consistent.

breos.weather.resample_to_15min(df_hourly[, ...])

Resample hourly DataFrame to 15-minute intervals.

breos.weather.resample_to_hourly(df_15min[, ...])

Resample 15-minute DataFrame to hourly intervals.

breos.weather.resample_tmy_to_15min(...)

Resample TMY data from hourly to 15-minute intervals using Makima interpolation.

Helpers#

breos.weather.extract_ambient_temperature(...)

Extract hourly ambient temperature from a weather DataFrame.

breos.weather.preload_weather_by_year(...[, ...])

Pre-load weather CSV once and split into per-year DataFrames.