Skip to content

A set of documented functions for simulating the performance of photovoltaic energy systems.

License

Notifications You must be signed in to change notification settings

allenlawrence94/pvlib-python

 
 

DarkSky Forecasting Model

Installation

$ pip install git+https://github.com/allenlawrence94/pvlib-python

Usage

>>> from pvlib.forecast import DarkSky
>>> forecaster = DarkSky(YOUR_DARKSKY_SECRET_KEY)  # get a secret key from https://darksky.net/dev/register
>>> forecast = forecaster.get_proccessed_data(40, -80)

By default, get_processed_data provides two days of hourly forecasts. To extend this to a week, you can use:

>>> forecast = forecaster.get_processed_data(40, -80, extend=True)

To retrieve historical forecasts, simply specify a starting datetime:

>>> forecast = forecaster.get_processed_data(40, -80, datetime.datetime(2018, 1, 1, 0, 0))

Note that this datetime must be timezone-naive, as the DarkSky API will infer timezone for us.

Going forward

  • This needs to be vetted as I know nothing about irradiance models.
  • This currently only supports hourly resolution, but could potentially do minutely and daily forecasts.

About

A set of documented functions for simulating the performance of photovoltaic energy systems.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.6%
  • Other 0.4%