pvlib-python · v0.16.1 · BSD-3-Clause

From sunlight to AC power, in one Python library.

pvlib is the open reference implementation of photovoltaic performance models. This guide maps what it can do today, stage by stage, so you can find a model, a data source or a place to contribute.

288documented functions and classes
53topics in 11 domains
17data providers and networks
41runnable gallery examples
37.6klines of library code, 21.8k of tests
218open issues, 30 open pull requests
The modelling chain

Nine steps turn weather into watts

Every pvlib model sits somewhere on this chain. Pick a step to filter the topic index and the API catalog below to just that step.

ModelChain runs the whole sequence for you; plain functions let you swap any single step.

Three ways in

Functions, objects or a full chain

The classes add no physics of their own. They wrap the same functions so you can choose how much bookkeeping pvlib does for you.

Procedural

Plain functions

Call each model directly with pandas Series or NumPy arrays. Full control, nothing hidden.

# sun position, then POA irradiance
sp = pvlib.solarposition.get_solarposition(
    times, 33.45, -111.98)
poa = pvlib.irradiance.get_total_irradiance(
    30, 180, sp.apparent_zenith,
    sp.azimuth, dni, ghi, dhi,
    model="perez", dni_extra=dni_extra)
Object oriented

Location and PVSystem

Keep site and hardware parameters on objects, then call methods that pass them along for you.

site = pvlib.location.Location(
    33.45, -111.98, tz="US/Arizona")
sp = site.get_solarposition(times)
system = pvlib.pvsystem.PVSystem(
    surface_tilt=30, surface_azimuth=180,
    module_parameters=mod,
    inverter_parameters=inv)
End to end

ModelChain

Infers suitable models from your system parameters and runs from weather, from POA or from effective irradiance.

mc = pvlib.modelchain.ModelChain(
    system, site, aoi_model="physical")
mc.run_model(weather)
mc.results.ac        # AC power
mc.results.cell_temperature
Topic index

Everything pvlib covers

53 topics grouped into 11 domains, each with the named models it implements and where they live in the API. This is the seed of a contributor knowledge base.

API catalog

Every documented function, with its one-line purpose

Pulled from the API reference and docstrings on the main branch. Open a group to browse it, or search to open every group with a match.

Knowledge base

The references behind the models

Free sources for every topic: national lab reports, open-access papers, data provider documentation and pvlib's own guides. Each entry has a short summary in our own words and a link to the original. pvlib's documentation is included in full.

Loading the knowledge base…

Energy Expert

Ask about PV modelling and pvlib

The Energy Expert answers from this knowledge base and cites the references it used. Answers can still be wrong, so check the linked sources before relying on a number.

Try one of these:

iotools

Where the weather comes from

pvlib fetches and parses irradiance and weather from 17 providers and networks, and reads the common file formats. Most functions return a DataFrame with pvlib's standard column names.

SourceKindAccessCoverageFunctions
Activity

Where the project is moving

v0.16.0 and v0.16.1 shipped on 26 September 2026. v0.16.2 is planned for December 2026 and is already collecting fixes.

Recent changes

  • v0.16.0ANTS-2D bifacial irradiance model, segmented ground surfaces, and view factors one to two orders of magnitude faster.
  • v0.16.0New data: NSRDB PSM4 Polar (above 60° latitude), NOAA SURFRAD retrieval, multi-dataset MERRA-2 requests.
  • v0.16.0Diffuse IAM on Array and PVSystem; Schlick IAM in ModelChain; sky diffuse components returned from transposition.
  • v0.16.2ERA5-Land option in get_era5; fixes to WVM with one site, scalar tracker output and ModelChain ohmic-loss naming.
  • v0.16.2Docstring clarifications for tracking, SPA output order, parameter fitting and the deprecated King model.

Gallery examples by topic

Low lift

Docstrings and links

About half of v0.16.2's notes so far are documentation fixes. Issues labelled good first issue and easy are the project's stated entry points.

Medium

Gallery examples

Five areas have one example or fewer: decomposition, IV modelling, solar position, floating PV and system models.

Medium

iotools

New data sources arrive almost every release. Each needs a fetcher, a parser, variable mapping and remote-data tests.

Deep

New published models

The library grows by adding peer-reviewed models with references, tests against published values and a whatsnew entry.