# Reference Observations¶

## Overview¶

The Solar Forecast Arbiter imports reference observation data from multiple measurement networks. All of the logic for creating the appropriate Solar Forecast Arbiter sites and observations and updating observations with new data from the network can be found in the solarforecastarbiter.io.reference_observations subpackage. Code for retrieving data from the network’s APIs are spread between the solarforecastarbiter.io.fetch subpackage, and the pvlib python iotools module.

A list of these networks and their Solar Forecast Arbiter modules can be found in the Available Network Handlers section. A map of all of the sites available in the reference dataset can be found on the Solar Forecast Arbiter project website.

## Structure¶

The solarforecastarbiter.io.reference_observations subpackage contains python modules and data files in JSON and CSV format.

### Data Files¶

• sfa_reference_sites.csv
The master list of reference sites. See the comment at the top of this file for descriptions of its fields. The file contains extra fields that are not found in the Solar Forecast Arbiter API schema for Sites. These fields are for use with the source network’s API and are stored in the extra_parameters field when the site is created for use in subsequent updates.
• <network>_reference_sites.json
Network-specific files containing site and observation metadata in the Solar Forecast Arbiter API’s JSON format. These are used when the master CSV does not contain all of the columns needed to accurately define a site or observation.

### Modules¶

#### Network Handlers¶

Network Handlers are network specific modules that implement a handful of functions with a common interface. See solarforecastarbiter.io.reference_observations.surfrad for an example.

The required network handler functions are:

• initialize_site_observations(api, site)

Create an observation at the site for each variable available from the network.

• initialize_site_forecasts(api, site)

Create a forecast for each observation at the site.

• update_observation_data(api, sites, observations, start, end)

Retrieve data from the network then format and post it to each observation at the site.