breos.weather.resample_to_15min#

breos.weather.resample_to_15min(df_hourly, method='makima', non_negative_cols=None, latitude=None, longitude=None)[source]#

Resample hourly DataFrame to 15-minute intervals.

When latitude/longitude are provided, uses clear-sky scaling for irradiance columns (GHI, DNI, DHI) to preserve solar physics at sunrise/sunset transitions. Otherwise falls back to direct interpolation.

Supports both TMY column names (ghi, dni, dhi) and Open-Meteo column names (shortwave_radiation, direct_normal_irradiance, diffuse_radiation).

Parameters:
  • df_hourly (DataFrame) – DataFrame with hourly DatetimeIndex

  • method (str) – Interpolation method (‘makima’, ‘linear’, ‘cubic’)

  • non_negative_cols (Optional[List[str]]) – Columns to clip at zero (auto-detected for solar/wind)

  • latitude (Optional[float]) – Location latitude for clear-sky scaling (optional)

  • longitude (Optional[float]) – Location longitude for clear-sky scaling (optional)

Return type:

DataFrame

Returns:

DataFrame with 15-minute intervals

Raises:

ValueError – If DataFrame doesn’t have DatetimeIndex