Skip to main content

RenCal

RenCal (Renewable Calibration) is a Python library for calibrating renewable energy power curves and generating probabilistic load-factor time series for wind and solar plants.

It supports Monte Carlo-based forecasting using weather, generation, and plant characteristic data. RenCal is intended for energy analysts, researchers, and developers working on renewable-energy modelling.

Status

RenCal is an experimental pre-1.0 public package. The API and modelling approach may change as the project develops. It is not currently a guarantee of production suitability or a substitute for independent validation.

Installation

The first public release will be installed from PyPI with:

python -m pip install rencal

Until that release is published, clone the repository and follow the development setup instead.

Quick start

The primary workflow uses data supplied by the user. RenCal does not distribute operational ERA5, generation, or plant datasets.

from pathlib import Path

from rencal.core.data_loader import LocalDataLoader

loader = LocalDataLoader(data_path=Path("data"))
plants = loader.load_plant_data()
generation = loader.load_generation_data()

print(f"Loaded {len(plants.data)} plants")
print(f"Loaded {len(generation.data)} generation records")

For the full wind-calibration workflow, provide the expected input structure:

data/
├── plant/plant_data.csv
├── generation/generation_data.parquet
└── era5/*.nc

The ERA5 loader expects suitable NetCDF weather data. Users are responsible for obtaining data, checking its provenance and licence, and preparing it for the documented schema.

Calibrate wind power curves

With the plant, generation, and ERA5 inputs in place, run the wind calibration workflow and write its outputs to a separate directory:

from pathlib import Path

from rencal.calibration.wind.wind_calibrator import WindCalibrator

calibrator = WindCalibrator(
    data_path="data",
    output_path=Path("outputs/wind-calibration"),
    visual_output=True,
    stream_npy_output=True,
)
calibrator.calibrate()

The workflow writes the calibration summary, Weibull parameters, extracted wind speeds, calibrated wind streams, and optional power-curve plots to the output directory. With stream_npy_output=True, the generated Wind Streams.npy can also be used by the weather sampler after its manifest and optional histogram artefacts have been prepared.

Sample calibrated wind streams

WeatherData samples future hourly paths from calibrated historical streams while preserving the configured time-bucket structure. The local loader expects the calibrated NPY file and its manifest under data/calibrated/.

import datetime
import random

import numpy as np

from rencal.core.data_loader import LocalDataLoader
from rencal.simulation.weather_data import HistoricalMetadata, WeatherData

loader = LocalDataLoader(data_path="data")
manifest = loader.check_historical_weather()
metadata = HistoricalMetadata.from_manifest(
    manifest,
    loader.path_resolver_weather_data,
)

wind_sampler = WeatherData(
    metadata=metadata,
    prefix_histograms=loader.get_prefix_histograms(),
    historical_data=loader.get_historical_weather(),
)

sample = wind_sampler.random_sample(
    datetime.datetime(2027, 1, 1),
    datetime.datetime(2027, 1, 7),
    python_rng=random.Random(4),
    numpy_rng=np.random.default_rng(32),
)

Pass desired_averages to WeatherData when inverse-distribution resampling is required; this also requires historical data or precomputed prefix histograms.

Main capabilities

  • Wind and solar power-curve calibration foundations
  • Probabilistic load-factor forecasting
  • Weather and generation data loading and validation
  • Time-bucketed sampling with geographical correlation support
  • Extensible interfaces for local and external data sources

Documentation

Hosted documentation and versioned examples will be linked here once the public documentation site is verified.

Support

Use GitHub Issues for public, reproducible bugs and feature requests. Please do not include credentials, internal data, or confidential information in issues.

Licence

RenCal is released under the MIT Licence.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rencal-0.1.1.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rencal-0.1.1-py3-none-any.whl (59.0 kB view details)

Uploaded Python 3

File details

Details for the file rencal-0.1.1.tar.gz.

File metadata

  • Download URL: rencal-0.1.1.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rencal-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a5f39af668c7bcdb5063ac7a88fdeda77b3722a06e7b995d3d0ccd0e7047a08
MD5 906057926b05351a979dde70bd071dfd
BLAKE2b-256 e4eae037a5308004ae1922e460ede465ab89a379c4a0c271de85a71f9d421a8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rencal-0.1.1.tar.gz:

Publisher: publish.yml on LCCC-Tech/rencal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rencal-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rencal-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 59.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rencal-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60f8f577be3caa35cd337e5fe684a4da7c3edddf389dd2407fccf167426b4fb9
MD5 29d882ede95393afe169638638a1cc6d
BLAKE2b-256 c05bebe8c31498a2dc241d97d2ee358fcd7a68e154cb9f30ff1dd8dd054bbae3

See more details on using hashes here.

Provenance

The following attestation bundles were made for rencal-0.1.1-py3-none-any.whl:

Publisher: publish.yml on LCCC-Tech/rencal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page