pvlib.iotools.parse_psm3#
- pvlib.iotools.parse_psm3(filename, map_variables=True)#
Deprecated since version 0.13.0: The parse_psm3 function was deprecated in pvlib 0.13.0 and will be removed soon. Use read_psm3 instead.
Read an NSRDB PSM3 weather file (formatted as SAM CSV). The NSRDB is described in [1] and the SAM CSV format is described in [2].
Changed in version 0.9.0: The function now returns a tuple where the first element is a dataframe and the second element is a dictionary containing metadata. Previous versions of this function had the return values switched.
- Parameters:
- Returns:
data (pandas.DataFrame) – timeseries data from NREL PSM3
metadata (dict) – metadata from NREL PSM3 about the record, see notes for fields
Notes
The return is a tuple with two items. The first item is a dataframe with the PSM3 timeseries data.
The second item is a dictionary with metadata from NREL PSM3 about the record containing the following fields:
Source
Location ID
City
State
Country
Latitude
Longitude
Time Zone
Elevation
Local Time Zone
Clearsky DHI Units
Clearsky DNI Units
Clearsky GHI Units
Dew Point Units
DHI Units
DNI Units
GHI Units
Solar Zenith Angle Units
Temperature Units
Pressure Units
Relative Humidity Units
Precipitable Water Units
Wind Direction Units
Wind Speed Units
Cloud Type -15
Cloud Type 0
Cloud Type 1
Cloud Type 2
Cloud Type 3
Cloud Type 4
Cloud Type 5
Cloud Type 6
Cloud Type 7
Cloud Type 8
Cloud Type 9
Cloud Type 10
Cloud Type 11
Cloud Type 12
Fill Flag 0
Fill Flag 1
Fill Flag 2
Fill Flag 3
Fill Flag 4
Fill Flag 5
Surface Albedo Units
Version
Examples
>>> # Read a local PSM3 file: >>> df, metadata = iotools.read_psm3("data.csv")
>>> # Read a file object or an in-memory buffer: >>> with open(filename, 'r') as f: ... df, metadata = iotools.read_psm3(f)
See also
References