Reference Forecasts


The Solar Forecast Arbiter supports reference forecasts based on data from numerical weather prediction (NWP) models and from site observations.

The main module orchestrates reference forecast generation within the Solar Forecast Arbiter. It uses data types defined in solarforecastarbiter.datamodel.

main Make benchmark irradiance and power forecasts., model, init_time, start, end) Calculate benchmark irradiance and power forecasts for a site.
main.run_persistence(session, observation, …) Run a persistence forecast for an observation.


Forecasts based on NWP model data are used for intraday and longer forecasts. The Solar Forecast Arbiter contains a set of functions to process data from NWP forecasts. These functions are found in the models module. Each function is specific to:

  1. A particular NWP model data set (e.g. NAM or subhourly HRRR), and
  2. The post processing steps required to obtain a particular type of irradiance or power forecast data (e.g. hourly mean or instantaneous).
models Default processing functions for data from NOAA weather models.
models.hrrr_subhourly_to_subhourly_instantaneous(…) Subhourly (15 min) instantantaneous HRRR forecast.
models.hrrr_subhourly_to_hourly_mean(…[, …]) Hourly mean HRRR forecast.
models.rap_ghi_to_instantaneous(latitude, …) Hourly instantantaneous RAP forecast.
models.rap_ghi_to_hourly_mean(latitude, …) Take hourly RAP instantantaneous irradiance and convert it to hourly average forecasts.
models.rap_cloud_cover_to_hourly_mean(…[, …]) Take hourly RAP instantantaneous cloud cover and convert it to hourly average forecasts.
models.gfs_quarter_deg_3hour_to_hourly_mean(…) Take 3 hr GFS and convert it to hourly average data.
models.gfs_quarter_deg_hourly_to_hourly_mean(…) Take 1 hr GFS and convert it to hourly average data.
models.gfs_quarter_deg_to_hourly_mean(…[, …]) Hourly average forecasts derived from GFS 1, 3, and 12 hr frequency output.
models.nam_12km_hourly_to_hourly_instantaneous(…) Hourly instantantaneous forecast.
models.nam_12km_cloud_cover_to_hourly_mean(…) Hourly average forecast.

All of the above functions return weather forecast data, a resampler function, and a solar position calculation function. The weather forecast data may be supplied to a PV model and then resampled using the resampler function. This workflow allows for seperation of weather data processing and PV modeling while preserving the ability to use more accurate, shorter time interval inputs to the PV model. Finally, these functions return a solar position calculation function (rather than the actual solar position) to simplify the API while maintaining reasonable performance. (Solar position is only sometimes needed within the model processing functions and is only needed externally if power is to be calculated.) See models module for additional documentation.

Many of the functions in models rely on common functions related to forecast processing. These functions are found in forecast.

forecast Functions for forecasting.
forecast.cloud_cover_to_ghi_linear(…[, offset]) Convert cloud cover to GHI using a linear relationship.
forecast.cloud_cover_to_irradiance_ghi_clear(…) Estimates irradiance from cloud cover in the following steps:
forecast.cloud_cover_to_irradiance(latitude, …) Estimates irradiance from cloud cover in the following steps:
forecast.resample(arg[, freq, closed]) Resamples an argument, allowing for None.
forecast.interpolate(arg[, freq, closed]) Interpolates an argument, allowing for None.
forecast.unmix_intervals(mixed) Convert mixed interval averages into pure interval averages.


The solarforecastarbiter supports several varieties of persistence forecasts.

persistence Functions for persistence forecasts.
persistence.persistence_scalar(observation, …) Make a persistence forecast using the mean value of the observation from data_start to data_end.
persistence.persistence_interval(…) Make a persistence forecast for an observation using the mean values of each interval_length bin from data_start to data_end.
persistence.persistence_scalar_index(…) Calculate a persistence forecast using the mean value of the observation clear sky index or AC power index from data_start to data_end.