pvlib.pvsystem.retrieve_sam#
- pvlib.pvsystem.retrieve_sam(name=None, path=None)[source]#
Retrieve latest module and inverter info from a file bundled with pvlib, a path or an URL (like SAM’s website).
This function will retrieve either:
CEC module database
Sandia Module database
CEC Inverter database
Anton Driesse Inverter database
and return it as a pandas DataFrame.
Note
Only provide one of
name
orpath
.- Parameters:
name (string, optional) –
Use one of the following strings to retrieve a database bundled with pvlib:
'CECMod'
- returns the CEC module database'CECInverter'
- returns the CEC Inverter database'SandiaInverter'
- returns the CEC Inverter database (CEC is only current inverter db available; tag kept for backwards compatibility)'SandiaMod'
- returns the Sandia Module database'ADRInverter'
- returns the ADR Inverter database
path (string, optional) – Path to a CSV file or a URL.
- Returns:
DataFrame – A DataFrame containing all the elements of the desired database. Each column represents a module or inverter, and a specific dataset can be retrieved by the command
- Raises:
ValueError – If no
name
orpath
is provided.ValueError – If both
name
andpath
are provided.KeyError – If the provided
name
is not a valid database name.
Notes
- Files available at
Examples
Using a database bundled with pvlib:
>>> from pvlib import pvsystem >>> invdb = pvsystem.retrieve_sam(name='CECInverter') >>> inverter = invdb.AE_Solar_Energy__AE6_0__277V_ >>> inverter Vac 277 Pso 36.197575 Paco 6000.0 Pdco 6158.746094 Vdco 360.0 C0 -0.000002 C1 -0.000026 C2 -0.001253 C3 0.00021 Pnt 1.8 Vdcmax 450.0 Idcmax 17.107628 Mppt_low 100.0 Mppt_high 450.0 CEC_Date NaN CEC_Type Utility Interactive Name: AE_Solar_Energy__AE6_0__277V_, dtype: object
Using a remote database, via URL:
>>> url = "https://raw.githubusercontent.com/NREL/SAM/refs/heads/develop/deploy/libraries/CEC%20Inverters.csv" >>> inv_db = pvsystem.retrieve_sam(path=url) >>> inv_db.keys() Index(['ABB__PVI_3_0_OUTD_S_US_A__208V_', 'ABB__PVI_3_0_OUTD_S_US_A__240V_', ...], dtype='object', length=...)
Examples using pvlib.pvsystem.retrieve_sam
#

Use different Perez coefficients with the ModelChain

4.7 MW CdTe single-axis tracking (OEDI System 9068)