0

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!

Adam R. Jensen
  • 617
  • 5
  • 12
Naj_m_Om
  • 33
  • 6

1 Answers1

1

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'
Adam R. Jensen
  • 617
  • 5
  • 12
  • How to specify the time range on a monthly basis. For example, If I want to download data for April 2020 – Naj_m_Om May 18 '22 at 15:02
  • Unfortunately, the get_surfrad function is currently limited to only retrieving data for one day at a time. Thus, currently, you have to loop over the individual files. We would happily accept a pull request to add a start/end keyword to allow for retrieving multiple days of data. – Adam R. Jensen May 19 '22 at 09:12