pvlib.iotools.get_surfrad#
- pvlib.iotools.get_surfrad(station, start, end, map_variables=True, url='https://gml.noaa.gov/aftp/data/radiation/surfrad/')[source]#
Request data from NOAA SURFRAD and read it into a DataFrame.
The SURFRAD network is described in [1]. The README files are located in the station directories in the SURFRAD data archives [2]. In addition to the FTP server, the SURFRAD files are also available via HTTP access [3].
Data is returned for complete days, including
startandend.- Parameters:
station (str) – Three-letter SURFRAD station abbreviation.
start (datetime-like) – First day of the requested period.
end (datetime-like) – Last day of the requested period.
map_variables (bool, default True) – Passed through to
read_surfrad(): whether to rename columns to pvlib variable names (e.g.'dw_solar'->'ghi').url (str, default ‘https://gml.noaa.gov/aftp/data/radiation/surfrad/’) – Base URL of the SURFRAD archive.
- Returns:
data (pd.DataFrame) – Dataframe with data from SURFRAD.
meta (dict) – Metadata.
See also
Notes
Missing days (e.g. before a station’s operational start date, or gaps in the archive) are skipped with a warning rather than raising an error.
Examples
>>> data, meta = pvlib.iotools.get_surfrad( ... station='bon', start='2020-01-01', end='2020-01-31')
References