pvlib

pvlib for read surfrad dataset has issue


In order to access SURFRAD irradiance data, I am running the following python command using the pvlib library:

import pvlib
data, meta = pvlib.iotools.read_surfrad(filename, map_variables=True)

I used URL for surfrad solar irradiance data as "https://gml.noaa.gov/aftp/data/radiation/surfrad/Boulder_CO/2020/". However, when applied this to the filename parameter, it doesn't work!


Solution

  • The filename argument passed to the pvlib SURFRAD reader function can either be a local path or a link to a specific file on the SURFRAD FTP server.

    To get data from the Boulder station for January 1st 2020, the correct filename would be:

    filename = 'ftp://aftp.cmdl.noaa.gov/data/radiation/surfrad/Boulder_CO/2020/tbl20001.dat'