Developer Network NREL NREL Developer Network

title: Physical Solar Model (PSM) v3.1 TMY

summary: This service has been replaced by a V3.2.2 version of the API. See PSM v3.2.2 TMY.

url: /api/nsrdb/v2/solar/psm3-tmy-download

deprecated: true

# ()

<div class="alert alert-danger" style="margin-top: 10px;">

<p></p>

</div>

<ul id="toc"></ul>

## Request URL

<pre>GET|POST .format?parameters</pre>

## Request Parameters

NOTE: when using POST to submit a request the api_key must still be included as a query parameter in the url. All other parameters may be included in a POST request as part of the payload.

<table border="0" cellpadding="0" cellspacing="0" class="doc-parameters">

<thead>

<tr>

<th class="doc-parameters-name" scope="col">Parameter</th>

<th class="doc-parameters-required" scope="col">Required</th>

<th class="doc-parameters-value" scope="col">Value</th>

<th class="doc-parameters-description" scope="col">Description</th>

</tr>

</thead>

<tbody>

<tr>

<th class="doc-parameter-name" scope="row">api_key</th>

<td class="doc-parameter-required">Yes</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: string</div>

<div class="doc-parameter-value-field">Default: None</div>

</td>

<td class="doc-parameter-description">

<p>Your developer API key. See API keys for more information.</p>

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">wkt</th>

<td class="doc-parameter-required">Yes</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: well-known text string</div>

<div class="doc-parameter-value-field">Default: None</div>

</td>

<td class="doc-parameter-description">

A well-known text (WKT) representation of the geometry for which to extract data. May be a point, multipoint, or polygon geometry. When a point is passed the site nearest to that point is used. When a multipoint is passed the site nearest each point is used. This can be useful for downloading multiple sites in a single request when those sites are geographically distant from each other. When a polygon is passed all sites that intersect with the given polygon are used.

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">attributes</th>

<td class="doc-parameter-required">No</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: comma delimited string array</div>

<div class="doc-parameter-value-field">Default: Returns ALL</div>

<div class="doc-parameter-value-field">Options: dhi, dni, ghi, dew_point, air_temperature, surface_pressure, wind_direction, wind_speed, surface_albedo</div>

</td>

<td class="doc-parameter-description">

Each specified attribute(*) will be returned as a column in the resultant CSV download.

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">names</th>

<td class="doc-parameter-required">Yes</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: comma delimited string array</div>

<div class="doc-parameter-value-field">Default: None</div>

<div class="doc-parameter-value-field">Options: tmy-2017, tdy-2017, tgy-2017. tmy-2018, tdy-2018, tgy-2018, tmy-2019, tdy-2019, tgy-2019, tmy-2020, tdy-2020, tgy-2020</div>

</td>

<td class="doc-parameter-description">The TMY dataset for which data should be extracted.</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">utc</th>

<td class="doc-parameter-required">No</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: true or false</div>

<div class="doc-parameter-value-field">Default: true</div>

</td>

<td class="doc-parameter-description">

Pass true to retrieve data with timestamps in UTC. Pass false to retrieve data with timestamps converted to local time of data point (without daylight savings time).

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">full_name</th>

<td class="doc-parameter-required">No</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: string</div>

<div class="doc-parameter-value-field">Default: None</div>

</td>

<td class="doc-parameter-description">The full name of the user requesting data.</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">email</th>

<td class="doc-parameter-required">Yes</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: email string</div>

<div class="doc-parameter-value-field">Default: None</div>

</td>

<td class="doc-parameter-description">

An active email for the user requesting data. This email will be used to deliver the extracted data.

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">affiliation</th>

<td class="doc-parameter-required">No</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: string</div>

<div class="doc-parameter-value-field">Default: None</div>

</td>

<td class="doc-parameter-description">

The organization with which the user requesting the data is affiliated.

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">reason</th>

<td class="doc-parameter-required">No</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: string</div>

<div class="doc-parameter-value-field">Default: None</div>

</td>

<td class="doc-parameter-description">The reason that the user is requesting the data.</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">mailing_list</th>

<td class="doc-parameter-required">No</td>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: true or false</div>

<div class="doc-parameter-value-field">Default: false</div>

</td>

<td class="doc-parameter-description">

Pass true to add the email address to our list of recipients for the NSRDB mailing list.

</td>

</tr>

</tbody>

</table>

## Response Fields

The response is composed of service-related informational fields and the results of the data query.

<table border="0" cellpadding="0" cellspacing="0" class="doc-parameters">

<thead>

<tr>

<th class="doc-parameters-name" scope="col">Field</th>

<th class="doc-parameters-value" scope="col">Value</th>

<th class="doc-parameters-description" scope="col">Description</th>

</tr>

</thead>

<tbody>

<tr>

<th class="doc-parameter-name" scope="row">errors</th>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: string array</div>

</td>

<td class="doc-parameter-description">

<p>A list of error messages</p>

</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">inputs</th>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: Object Hash</div>

</td>

<td class="doc-parameter-description">Key: Value pairs representing all input parameters</td>

</tr>

<tr>

<th class="doc-parameter-name" scope="row">outputs</th>

<td class="doc-parameter-value">

<div class="doc-parameter-value-field">Type: Object Hash</div>

</td>

<td class="doc-parameter-description">Upon successful completion a message will be returned informing the user that file generation is in progress and an email will be sent to the address provided in the email input field when the download is ready</td>

</tr>

</tbody>

</table>

## Data File Format

Generated data files are formatted in accordance with the Standard Time Series Data File Format. This file format has been developed to support SAM and other NREL models and is documented fully in this PDF. More information on SAM file formats available on the SAM weather page.

## Examples

### JSON Output Format

<div class="doc-example-url">GET .json?wkt=POINT(-99.49218%2043.83452)&attributes=dhi%2Cdni%2Cghi%2Cdew_point%2Cair_temperature%2Csurface_pressure%2Cwind_direction%2Cwind_speed%2Csurface_albedo%2C%2C%2C&names=tmy-2017%2Ctdy-2017%2Ctgy-2017&full_name=Louis%20Bourbon&email=user@company.com&affiliation=NREL&mailing_list=false&reason=test&utc=true</div>

```json

{

"errors": [],

"inputs": {

"wkt": "POINT(-99.49218 43.83452)",

"attributes": [

"dhi",

"dni",

"ghi",

"dew_point",

"air_temperature",

"surface_pressure",

"wind_direction",

"wind_speed",

"surface_albedo"

],

"names": [

"tmy-2017",

"tdy-2017",

"tgy-2017"

],

"full_name": "Louis Bourbon",

"email": "user@company.com",

"affiliation": "NREL",

"mailing_list": false,

"reason": "test",

"utc": true

},

"outputs": {

"message": "File generation in progress. An email will be sent to user@company.com when the download is ready."

}

}

```

### CSV Output Format

Direct streaming of CSV data is supported for single location, single year only. The following response example is truncated after the first few rows of data.

<div class="doc-example-url">GET .csv?wkt=POINT(-99.49218%2043.83452)&attributes=dhi%2Cdni%2Cghi%2Cdew_point%2Cair_temperature%2Csurface_pressure%2Cwind_direction%2Cwind_speed%2Csurface_albedo%2C%2C%2C&names=tmy-2017%2Ctdy-2017%2Ctgy-2017&full_name=Louis%20Bourbon&email=user@company.com&affiliation=NREL&mailing_list=false&reason=test&utc=true</div>

```csv

Source,Location ID,City,State,Country,Latitude,Longitude,Time Zone,Elevation,Local Time Zone,Dew Point Units,DHI Units,DNI Units,GHI Units,Temperature Units,Pressure Units,Wind Direction Units,Wind Speed,Surface Albedo Units,Version

NSRDB,629434,-,-,-,43.85,-99.5,0,507,-6,c,w/m2,w/m2,w/m2,c,mbar,Degrees,m/s,N/A,v3.0.0

Year,Month,Day,Hour,Minute,DHI,DNI,GHI,Dew Point,Temperature,Pressure,Wind Direction,Wind Speed,Surface Albedo

1998,1,1,0,0,0,0,0,0,1,950.0,43.2,3.3000000000000003,0.18508000671863556

1998,1,1,1,0,0,0,0,-1,1,940.0,54.1,3.4000000000000004,0.18508000671863556

1998,1,1,2,0,0,0,0,-1,1,940.0,58.0,3.5,0.18508000671863556

1998,1,1,3,0,0,0,0,-1,1,940.0,59.1,3.7,0.18508000671863556

1998,1,1,4,0,0,0,0,-1,1,940.0,60.1,3.8000000000000003,0.18508000671863556

1998,1,1,5,0,0,0,0,-1,1,940.0,62.0,3.7,0.18508000671863556

1998,1,1,6,0,0,0,0,-1,0,940.0,62.800000000000004,3.6,0.18508000671863556

```

sd

### POST request example in Python

```python

import requests

url = "http://developer.nrel.gov.json?api_key=yourapikeygoeshere"

payload = "wkt=POINT(-99.49218%2043.83452)&attributes=dhi%2Cdni%2Cghi%2Cdew_point%2Cair_temperature%2Csurface_pressure%2Cwind_direction%2Cwind_speed%2Csurface_albedo%2C%2C%2C&names=tmy-2017%2Ctdy-2017%2Ctgy-2017&full_name=Louis%20Bourbon&email=user@company.com&affiliation=NREL&mailing_list=false&reason=test&utc=true"

headers = {

'content-type': "application/x-www-form-urlencoded",

'cache-control': "no-cache"

}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

```

<h2 id="rate-limits">Rate Limits</h2>

Rate limits for this application are significantly less than the standard rate limits for developer.nrel.gov. This decrease in the limit is required as the data provided through this service is significantly more computationally intensive to generate and provide. These rate limits are carefully calculated to allow all users the maximum throughput that our servers can sustain.

There are several levels of rate limiting for this service. The first limit determines how many requests a given user can make per 24 hour period. For requests utilizing the .csv format this rate limit is set at 5000 a day at a frequency of no more than 1 per second. For all other requests this limit is set at 1000 requests per day at a frequency of no more than 1 every 2 seconds.

Secondly each user is limited to 20 in-flight requests at any given time.

In addition, the service has a fail-safe mechanism to prevent significant performance decreases that can be caused by unexpectedly high usage of the service. This limit will cause the service to stop accepting requests when the queue reaches a point where additional requests will significantly lower server performance. When this limit is hit, the service will error with a message describing that the request queue is full.

For some tips and tricks to maximize data downloads please read the guide here.

<h2 id="contacts">Contact</h2>

<p>For questions about the API or the data models please contact nsrdb@nrel.gov</p>

<h2 id="errors">Errors</h2>

<p>Standard errors may be returned. In addition, the following service-specific errors may be returned:</p>

<table border="0" cellpadding="0" cellspacing="0" class="doc-parameters">

<thead>

<tr>

<th class="doc-parameters-name" scope="col" style="width: 100px;">HTTP Status Code</th>

<th class="doc-parameters-required" scope="col">Description</th>

</tr>

</thead>

<tbody>

<tr>

<th class="doc-parameter-name" scope="row">400</th>

<td class="doc-parameter-description">Bad Request: When required parameters are missing.</td>

</tr>

</tbody>

</table>

Help Improve this Content