energy_data_retrieval.sources.surfrad.client#

NOAA SURFRAD daily radiation and meteorology with native interval-end labels.

The seven primary SURFRAD stations report three-minute averages before 2009 and one-minute averages thereafter. Acquisition retains the original daily text, header, measurement fields and quality codes; it performs no quality masking, hourly aggregation, or automatic deduplication against the BSRN archive.

energy_data_retrieval.sources.surfrad.client.normalize_stations(text)[source]#

Read the official seven-station table, preserving BND versus bon identity.

The linked ARM Southern Great Plains station is explicitly outside this provider. Catalogue positions are current metadata and do not replace the coordinates/elevation in a historical observation file’s own header.

Parameters:

text (str)

Return type:

DataFrame

energy_data_retrieval.sources.surfrad.client.normalize_day(text, station_id, day, *, maximum_rows=1440)[source]#

Keep the native UTC averaging-period end and all 48 original text fields.

Parameters:
  • text (str)

  • station_id (str)

  • day (date)

  • maximum_rows (int)

Return type:

DataFrame

class energy_data_retrieval.sources.surfrad.client.SURFRADStations(frame: 'pd.DataFrame', request: 'RequestRecord', raw_text: 'str')[source]#

Bases: object

Parameters:
frame: DataFrame#
request: RequestRecord#
raw_text: str#
class energy_data_retrieval.sources.surfrad.client.SURFRADDay(station_id: 'str', day: 'date', maximum_rows: 'int', frame: 'pd.DataFrame', request: 'RequestRecord', raw_text: 'str')[source]#

Bases: object

Parameters:
  • station_id (str)

  • day (date)

  • maximum_rows (int)

  • frame (DataFrame)

  • request (RequestRecord)

  • raw_text (str)

station_id: str#
day: date#
maximum_rows: int#
frame: DataFrame#
request: RequestRecord#
raw_text: str#
energy_data_retrieval.sources.surfrad.client.save_stations(result, output)[source]#

Save the seven-station catalogue and exact public HTML snapshot.

Parameters:
Return type:

Artifact

energy_data_retrieval.sources.surfrad.client.save_day(result, output)[source]#

Save native interval observations and their exact daily text export.

Parameters:
Return type:

Artifact

class energy_data_retrieval.sources.surfrad.client.SURFRADClient(http, maximum_rows=1440, maximum_days=366)[source]#

Bases: object

Bounded acquisition of the primary seven-station SURFRAD daily archive.

Parameters:
  • http (HTTPClient)

  • maximum_rows (int)

  • maximum_days (int)

http: HTTPClient#
maximum_rows: int#
maximum_days: int#
stations()[source]#
Return type:

SURFRADStations

retrieve_stations(output)[source]#
Parameters:

output (Path)

Return type:

Artifact

day(station_id, day)[source]#
Parameters:
  • station_id (str)

  • day (date)

Return type:

SURFRADDay

iter_days(station_id, start, end)[source]#

Yield daily partitions; unavailable days fail explicitly instead of being skipped.

Parameters:
  • station_id (str)

  • start (date)

  • end (date)

Return type:

Iterator[SURFRADDay]

retrieve(station_id, day, output)[source]#

Verify completed output and native sidecar before any network access.

Parameters:
  • station_id (str)

  • day (date)

  • output (Path)

Return type:

Artifact