{"id":5011,"library":"pvlib","title":"pvlib","description":"pvlib python is a free and open source library that provides a set of functions and classes for simulating the performance of photovoltaic energy systems. It includes tools for solar position, clear sky irradiance, array sizing, PV system modeling, and data input/output. The current version is 0.15.0, with major releases typically occurring annually, and minor releases addressing bugs and adding features more frequently.","status":"active","version":"0.15.0","language":"en","source_language":"en","source_url":"https://github.com/pvlib/pvlib-python","tags":["solar","photovoltaic","energy","simulation","renewable energy"],"install":[{"cmd":"pip install pvlib","lang":"bash","label":"Install pvlib"}],"dependencies":[],"imports":[{"symbol":"Location","correct":"from pvlib.location import Location"},{"symbol":"get_solarposition","correct":"from pvlib.solar_position import get_solarposition"},{"symbol":"ModelChain","correct":"from pvlib.modelchain import ModelChain"},{"symbol":"PVSystem","correct":"from pvlib.pvsystem import PVSystem"},{"symbol":"get_total_irradiance","correct":"from pvlib.irradiance import get_total_irradiance"}],"quickstart":{"code":"import pandas as pd\nfrom pvlib.location import Location\nfrom pvlib.solar_position import get_solarposition\n\n# Define a location (Tucson, Arizona)\ntucson = Location(32.2, -110.9, 'US/Arizona', 792, 'Tucson')\n\n# Define time range\ntimes = pd.date_range('2024-01-01 12:00:00', freq='H', periods=3, tz=tucson.tz)\n\n# Get solar position\nsolpos = get_solarposition(times, tucson.latitude, tucson.longitude)\n\nprint(solpos)","lang":"python","description":"This quickstart code defines a geographical location, creates a time series, and then calculates the solar position (zenith, azimuth, etc.) for those times using pvlib's core functionalities. It demonstrates basic usage of `Location` and `get_solarposition`."},"warnings":[{"fix":"Migrate to `ModelChain.run_model()` with explicit data inputs (e.g., `ModelChain.run_model(weather_data)` where `weather_data` contains GHI, DNI, DHI, etc.).","message":"Several `ModelChain.run_*` methods (e.g., `run_cec_sam`, `run_tmy_data`, `run_poa_cec_inverter`) were removed in v0.14.0. Users should now use the more general `ModelChain.run_model()` method and pass appropriate data structures for inputs.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Remove `dni_extra` and `airmass` parameters from calls to `pvlib.irradiance.perez`. If custom calculation is needed, supply arguments via `dni_extra_kwargs` or `airmass_model`.","message":"The `pvlib.irradiance.perez` function no longer accepts `dni_extra` or `airmass` as explicit parameters since v0.14.0. These values are now computed internally if not provided through `dni_extra_kwargs` or `airmass_model`.","severity":"breaking","affected_versions":">=0.14.0"},{"fix":"Update calls to `pvlib.temperature.sapm_module` and `pvlib.temperature.pvsyst_cell` to use the `temp_air_wind_speed` parameter name instead of `wind_speed`.","message":"The `wind_speed` parameter was renamed to `temp_air_wind_speed` in `pvlib.temperature.sapm_module` (v0.13.0) and in `pvlib.temperature.pvsyst_cell` (v0.15.0) to improve naming consistency.","severity":"breaking","affected_versions":">=0.13.0 (sapm_module), >=0.15.0 (pvsyst_cell)"},{"fix":"Migrate to alternative single-diode models or other functions within `pvlib.singlediode` (e.g., `pvlib.singlediode.singlediode`).","message":"The `pvlib.singlediode.bishop88_i_from_v` function was removed in v0.13.0, and `pvlib.singlediode.bishop88` (the main function) was deprecated in v0.13.0 and removed in v0.15.0.","severity":"breaking","affected_versions":">=0.13.0 (i_from_v removed, bishop88 deprecated), >=0.15.0 (bishop88 removed)"},{"fix":"Access the string representation using `.tz.tzname(times[0])` or convert to string if necessary, e.g., `str(location.tz)`.","message":"Since v0.12.0, `Location.tz` and `PVSystem.tz` attributes now store `pytz.timezone` objects directly instead of string representations of timezones. This can break code that expects a string for timezone checking or serialization.","severity":"gotcha","affected_versions":">=0.12.0"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}