Single Site Simulation

With a single call to the SolarAnywhere API, you can simulate the output of a single PV system and retrieve:

  • AC Power and AC Energy Production 
  • Plane of Array Irradiance (POAI)
  • Global Horizontal Irradiance (GHI), Direct Normal Irradiance (DNI) and Diffuse Horizontal Irradiance (DHI)
  • Wind Speed and Ambient Temperature
  • Solid and Liquid Precipitation
  • Snow Depth
Simulation GET Request

Request the PV simulation output of a single PV system with a defined EnergySiteId. To define the specifications of the EnergySiteId, see Energy Site Management.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v1/Simulate"
userName = "your_username@your_company.com"
password = "your_password"
querystring = {
    "key":"your_client_key",
    "EnergySiteId":"your_site_id",
    "StartTime":"your_start_time",
    "EndTime":"your_end_time", }
outputfields = "?PowerAC"
headers = {
    'content-type': "text/xml; charset=utf-8",
    'content-length': "length",
    }

response = requests.get(url + outputfields,params=querystring,
           auth = HTTPBasicAuth(userName,password))

print(response.text)
Sample Requests

Single site simulations can be used to quickly and synchronously load PV simulation and weather data about a defined EnergySiteId. Each simulation request uses information tied to the EnergySiteId to return weather data and pass it through the simulation model to produce plane of array irradiance (POAI), AC power and AC energy.

 

For example, if you want to simulate only the AC power output of your EnergySite, you can create a request that returns only simulation model output. Additionally, if you want to include the associated weather and irradiance data with the request, additional parameters can be passed to return a more detailed dataset.

import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v1/Simulate"
userName = “your_username@your_company.com”
password = “your_password”
querystring = {
    "key":"your_client_key",
    "EnergySiteId":"your_site_id",
    "StartTime":"your_start_time",
    "EndTime":"your_end_time",}
outputfields = "?PowerAC"
headers = {
    'content-type': "text/xml; charset=utf-8",
    'content-length': "length",
    }

response = requests.get(url + outputfields,params=querystring
           auth = HTTPBasicAuth(UserName,password))

print(response.text)
import requests
from requests.auth import HTTPBasicAuth

url = "https://service.solaranywhere.com/api/v1/Simulate"
userName = “your_username@your_company.com”
password = “your_password”
querystring = {
    "key":"your_client_key",
    "EnergySiteId":"your_site_id",
    "StartTime":"your_start_time",
    "EndTime":"your_end_time",}
outputfields = "?PowerAC&GlobalHorizontal&DirectNormal&DiffuseHorizontal"
headers = {
    'content-type': "text/xml; charset=utf-8",
    'content-length': "length",
    }

response = requests.get(url + outputfields,params=querystring
           auth = HTTPBasicAuth(UserName,password))

print(response.text)

Single site simulations can be performed using both historical and forecast data by specifying the StartTime and EndTime fields relative to the present time.

 

For more details about each query string dataset, explore the Terms and Concepts.

Response

Requesting a single site simulation will return data about the designated EnergySite for the period between the StartTime and EndTime. The data that is included in the response will be based on the request query string data fields.

 

Take a look at the example Simulate response below to get a better idea of how the response is structured.

 

For access to additional data fields, please Contact Us.

<SimulationResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="v3" EnergySiteId="EHmMWnHp-EqzKJx3McTWWg
  RequestURL="/SolarAnywhereToolkit/Services/Services.svc/v1/Simulate?EnergySiteId=EHmMWnHp-EqzKJx3McTWWg&
  StartTime=2011-01-01T09%3a00%3a00-08%3a00&EndTime=2011-01-01T11%3a00%3a00-08%3a00&AmbientTemperature&WindSpeed&key=****EY"
  Status="Success">
 <SimulationPeriods>
  <SimulationPeriod StartTime="2011-01-01T11:00:00-06:00" EndTime="2011-01-01T12:00:00-06:00"
    Power_kW="2.92453462367618" ObservationTypes="AD" AmbientTemperature_DegreesC="0" 
    WindSpeed_MetersPerSecond="3"/>
  <SimulationPeriod StartTime="2011-01-01T12:00:00-06:00" EndTime="2011-01-01T13:00:00-06:00"
    Power_kW="3.07792648790834" ObservationTypes="AD" AmbientTemperature_DegreesC="0" 
    WindSpeed_MetersPerSecond="3"/>
 </SimulationPeriods>
</SimulationResponse>