Developer Network NREL NREL Developer Network

PVWatts (Version 4) (GET /api/pvwatts/v4)

NREL's PVWatts calculates the energy production of grid-connected photovoltaic (PV) energy systems. This service estimates the performance of hypothetical residential and small commercial PV installations.

PVWatts Version 4 has been replaced by version 5. While we will continue to make the V4 API available, it is recommended that people switch to version 5 to use the most up-to-date models available.

Request URL

GET /api/pvwatts/v4.format?parameters

Request Parameters

Parameter Required Value Description
format Yes
Type: string
Default: None
Options: json, xml

The output response format.

api_key Yes
Type: string
Default: None

Your developer API key. See API keys for more information.

system_size Yes
Type: decimal
Default: None
Range: 0.05 to 500000

Nameplate capacity (kW).

address Depends
Type: string
Default: None

The address to use. Required if lat/lon or file_id not specified.

lat Depends
Type: decimal
Default: None
Range: -90 to 90

The latitude for the location to use. Required if address or file_id not specified.

lon Depends
Type: decimal
Default: None
Range: -180 to 180

The longitude for the location to use. Required if address or file_id not specified.

file_id Depends
Type: string
Default: none
Reference to a specific climate data file to use. Must be a valid id returned by the Solar Dataset Query API. Required if lat/lon or address not specified.
dataset No
Type: string
Default: tmy3
Options: tmy2, tmy3, intl, IN

The climate dataset to use. Should not be passed in if using file_id to specify the climate data file.

Option Description
tmy2

TMY2 station data (see Typical Meteorological Year, version 2)

tmy3

TMY3 station data (see Typical Meteorological Year version 3)

intl

International station data

IN

India 10km gridded solar resource data (see India Solar Resource Maps)

radius No
Type: integer
Default: 100

The search radius to use when searching for the closest climate data station (miles). Pass in radius=0 to use the closest station regardless of the distance.

timeframe No
Type: string
Default: monthly
Options: monthly, hourly
Granularity of the output response.
azimuth No
Type: decimal
Default: None
Min: 0
Max: < 360
Azimuth angle (degrees).
derate No
Type: decimal
Default: None
Range: 0 to 1
System derate value.
tilt No
Type: decimal
Default: None
Tilt angle (degrees).
tilt_eq_lat No
Type: integer
Default: 0
Options: 0, 1

Override the tilt variable to equal latitude (default 0 unless tilt provided).

Option Description
0 False
1 True
track_mode No
Type: integer
Default: 1
Options: 0, 1, 2

Tracking mode.

Option Description
0 Fixed
1 1-Axis
2 2-Axis
inoct No
Type: decimal
Default: None
Range: 30 to 80

Nominal operating cell temperature (C)

gamma No
Type: decimal
Default: None
Range: -2 to -0.01

Max power temperature coefficient (%/C)

callback No
Type: string
Default: None

Return the data using JSONP and the given callback function (only applicable when using the json format).

Response Fields

The response is composed of service-related informational fields and the results of the PVWatts simulation.

Field Value Description
inputs Type: collection The input parameters received in the request.
errors Type: array of strings Any error messages resulting from the request.
warnings Type: array of strings Any warning messages resulting from the request.
version Type: string The current version of the web service.
ssc_info Type: collection Information about the SSC library.
station_info Type: collection Information about the climate data used in the simulation. (see station info fields for more detail)
outputs Type: collection The data outputs from the simulation. (see output fields for more detail)


Station Info Fields

Field Value Description
lat Type: decimal Latitude of the climate station.
lon Type: decimal Longitude of the climate station.
elev Type: decimal Elevation of the climate station. (meters)
tz Type: decimal Timezone offset from GMT.
location Type: string ID of the climate station.
city Type: string City where climate station is located.
state Type: string State where climate station is located.
file_name Type: string Solar resource filename.
distance Type: integer Distance between the input location and the climate station. (meters)


Output Fields

Field Value Description
poa_monthly Type: array of decimal Monthly plane of array irradiance values.

The array of values represents the value for each month, with the first element being for January and the last element being for December.
dc_monthly Type: array of decimal Monthly DC array output.

The array of values represents the value for each month, with the first element being for January and the last element being for December.
ac_monthly Type: array of decimal Monthly AC system output.

The array of values represents the value for each month, with the first element being for January and the last element being for December.
ac_annual Type: decimal Annual AC system output.
solrad_monthly Type: array of decimal Monthly solar radiation values.

The array of values represents the value for each month, with the first element being for January and the last element being for December.
solrad_annual Type: decimal Annual solar radiation values.
ac Type: array of decimal Hourly AC system output (only when timeframe=hourly)
poa Type: array of decimal Hourly plane of array irradiance (only when timeframe=hourly)
dn Type: array of decimal Hourly beam normal irradiance (only when timeframe=hourly)
dc Type: array of decimal Hourly DC array output (only when timeframe=hourly)
df Type: array of decimal Hourly diffuse irradiance (only when timeframe=hourly)
tamb Type: array of decimal Hourly ambient temperature (only when timeframe=hourly)
tcell Type: array of decimal Hourly module temperature (only when timeframe=hourly)
wspd Type: array of decimal Hourly windspeed (only when timeframe=hourly)

Examples

JSON Output Format

GET /api/pvwatts/v4.json?api_key=DEMO_KEY&system_size=4&dataset=tmy2&derate=0.77&lat=40&lon=-105
{
  "station_info": {
    "tz": -7,
    "location": "94018",
    "lon": -105.25,
    "file_name": "94018.tm2",
    "city": "BOULDER",
    "state": "CO",
    "lat": 40.01666641235352,
    "elev": 1634,
    "distance": 21235
  },
  "errors": [

  ],
  "version": "4.0.0",
  "inputs": {
    "system_size": "4",
    "lon": "-105",
    "derate": "0.77",
    "dataset": "tmy2",
    "lat": "40",
    "api_key": "DEMO_KEY"
  },
  "warnings": [

  ],
  "outputs": {
    "poa_monthly": [
      137.1923980712891,
      137.0316772460938,
      187.4732360839844,
      182.7943878173828,
      185.7599792480469,
      182.4970855712891,
      187.8779907226562,
      193.34228515625,
      187.3993988037109,
      175.8596649169922,
      137.8765869140625,
      132.9652557373047
    ],
    "dc_monthly": [
      468.0147399902344,
      457.9238891601562,
      616.0709228515625,
      581.62548828125,
      576.5953979492188,
      551.68603515625,
      553.3501586914062,
      569.5568237304688,
      564.85595703125,
      550.3904418945312,
      460.4128112792969,
      454.1395263671875
    ],
    "ac_annual": 5834.35107421875,
    "solrad_annual": 5.553147792816162,
    "ac_monthly": [
      426.7577514648438,
      417.6890869140625,
      563.779541015625,
      529.3705444335938,
      523.4755249023438,
      500.5887451171875,
      502.0051879882812,
      518.2822875976562,
      515.994140625,
      503.0267639160156,
      420.1042785644531,
      413.2771606445312
    ],
    "solrad_monthly": [
      4.425561428070068,
      4.893988609313965,
      6.047523975372314,
      6.093146324157715,
      5.992257595062256,
      6.083236217498779,
      6.060580253601074,
      6.236847877502441,
      6.246646404266357,
      5.672892570495605,
      4.59588623046875,
      4.289201736450195
    ]
  },
  "ssc_info": {
    "version": 27,
    "build": "Unix 64 bit GNU/C++ Jan 10 2013 20:00:07"
  }
}

XML Output Format

GET /api/pvwatts/v4.xml?api_key=DEMO_KEY&system_size=4&dataset=tmy2&derate=0.77&lat=40&lon=-105
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <inputs>
    <api-key>DEMO_KEY</api-key>
    <system-size>4</system-size>
    <dataset>tmy2</dataset>
    <derate>0.77</derate>
    <lat>40</lat>
    <lon>-105</lon>
  </inputs>
  <errors type="array"/>
  <warnings type="array"/>
  <version>4.0.0</version>
  <ssc-info>
    <version type="integer">27</version>
    <build>Unix 64 bit GNU/C++ Jan 10 2013 20:00:07</build>
  </ssc-info>
  <station-info>
    <lat type="float">40.016666412353516</lat>
    <lon type="float">-105.25</lon>
    <elev type="float">1634.0</elev>
    <tz type="float">-7.0</tz>
    <location>94018</location>
    <city>BOULDER</city>
    <state>CO</state>
    <file-name>94018.tm2</file-name>
    <distance type="integer">21235</distance>
  </station-info>
  <outputs>
    <ac-monthly type="array">
      <ac-monthly type="float">426.75775146484375</ac-monthly>
      <ac-monthly type="float">417.6890869140625</ac-monthly>
      <ac-monthly type="float">563.779541015625</ac-monthly>
      <ac-monthly type="float">529.3705444335938</ac-monthly>
      <ac-monthly type="float">523.4755249023438</ac-monthly>
      <ac-monthly type="float">500.5887451171875</ac-monthly>
      <ac-monthly type="float">502.00518798828125</ac-monthly>
      <ac-monthly type="float">518.2822875976562</ac-monthly>
      <ac-monthly type="float">515.994140625</ac-monthly>
      <ac-monthly type="float">503.0267639160156</ac-monthly>
      <ac-monthly type="float">420.1042785644531</ac-monthly>
      <ac-monthly type="float">413.27716064453125</ac-monthly>
    </ac-monthly>
    <poa-monthly type="array">
      <poa-monthly type="float">137.19239807128906</poa-monthly>
      <poa-monthly type="float">137.03167724609375</poa-monthly>
      <poa-monthly type="float">187.47323608398438</poa-monthly>
      <poa-monthly type="float">182.7943878173828</poa-monthly>
      <poa-monthly type="float">185.75997924804688</poa-monthly>
      <poa-monthly type="float">182.49708557128906</poa-monthly>
      <poa-monthly type="float">187.87799072265625</poa-monthly>
      <poa-monthly type="float">193.34228515625</poa-monthly>
      <poa-monthly type="float">187.39939880371094</poa-monthly>
      <poa-monthly type="float">175.8596649169922</poa-monthly>
      <poa-monthly type="float">137.8765869140625</poa-monthly>
      <poa-monthly type="float">132.9652557373047</poa-monthly>
    </poa-monthly>
    <solrad-monthly type="array">
      <solrad-monthly type="float">4.425561428070068</solrad-monthly>
      <solrad-monthly type="float">4.893988609313965</solrad-monthly>
      <solrad-monthly type="float">6.0475239753723145</solrad-monthly>
      <solrad-monthly type="float">6.093146324157715</solrad-monthly>
      <solrad-monthly type="float">5.992257595062256</solrad-monthly>
      <solrad-monthly type="float">6.083236217498779</solrad-monthly>
      <solrad-monthly type="float">6.060580253601074</solrad-monthly>
      <solrad-monthly type="float">6.236847877502441</solrad-monthly>
      <solrad-monthly type="float">6.246646404266357</solrad-monthly>
      <solrad-monthly type="float">5.6728925704956055</solrad-monthly>
      <solrad-monthly type="float">4.59588623046875</solrad-monthly>
      <solrad-monthly type="float">4.289201736450195</solrad-monthly>
    </solrad-monthly>
    <dc-monthly type="array">
      <dc-monthly type="float">468.0147399902344</dc-monthly>
      <dc-monthly type="float">457.92388916015625</dc-monthly>
      <dc-monthly type="float">616.0709228515625</dc-monthly>
      <dc-monthly type="float">581.62548828125</dc-monthly>
      <dc-monthly type="float">576.5953979492188</dc-monthly>
      <dc-monthly type="float">551.68603515625</dc-monthly>
      <dc-monthly type="float">553.3501586914062</dc-monthly>
      <dc-monthly type="float">569.5568237304688</dc-monthly>
      <dc-monthly type="float">564.85595703125</dc-monthly>
      <dc-monthly type="float">550.3904418945312</dc-monthly>
      <dc-monthly type="float">460.4128112792969</dc-monthly>
      <dc-monthly type="float">454.1395263671875</dc-monthly>
    </dc-monthly>
    <ac-annual type="float">5834.35107421875</ac-annual>
    <solrad-annual type="float">5.553147792816162</solrad-annual>
  </outputs>
</response>

Rate Limits

Standard rate limits apply. No more than 1,000 requests may be made in any hour

Errors

Standard errors may be returned. In addition, the following service-specific errors may be returned:

HTTP Status Code Description
422 Unprocessable Entity - One or more parameters did not pass validation, or a parameter may be missing. Check the errors section of the response to see how the request should be modified to address the error.
Help Improve this Content