SolarArbiter / solarforecastarbiter-core

Core data gathering, validation, processing, and reporting package for the Solar Forecast Arbiter
https://solarforecastarbiter-core.readthedocs.io
MIT License
33 stars 21 forks source link

datamodel: add `load` as an allowed variable #806

Closed dplarson closed 1 year ago

dplarson commented 1 year ago

Add load as an allowed variable. Previously the datamodel only supported net_load as a variable and therefore made no distinction between (gross) load vs net load. One of the key differences is that load is generally defined as a non-negative measure of energy demand, while net load is the signed measured of energy demand import (positive values) vs export (negative values). This is a subtle but important difference, and supporting both variables (load and net_load) in the datamodel will enable better defined functionality for users. For example, when validating load data, negative values should be treated as erroroneous. But negative values net load data should be treated as valid.

dplarson commented 1 year ago

Note: the way everything is coded in the API and Dashboard, the addition of the load variable in sfa-core gets propagated automatically to the API and Dashboard. For example, if try to create a new Observation in the Dashboard, the load variable is listed without having to make any code changes to the sfa-dashboard repo.

screenshot_observation screenshot_variables
dplarson commented 1 year ago

Forgot to mention: based on discussions among the current project team, we settled on using the nomenclature of "load" and "net load", rather than "gross load" and "net load", where "load" is a non-negative measure of energy demand while "net load" is a signed measure to differentiate between import vs export of energy (e.g., import energy to meet demand vs export excess solar generation once the local demand is met).

This is due to a combination of factors, including higher prevalence of "load" compared to "gross load" (or similarly, "true demand") and simplicity of naming. While there are valid arguments for other choices, the choice of "load" as the name seems to be the best choice at this time for all those involved in the Arbiter (contributors/maintainers, forecast providers, and forecast consumers).

awig commented 1 year ago

I've been able to replicate using the local dashboard. Changes are straightforward and simple. No pytest issues.