Collect and download, as CSV, a configurable set of wave data fields from the DOE-WPTO.
This API is capable of creating very large downloadable archives. Unlike a typical API, the response to this provides a request acknowledgement. The real work of creating the requested downloadable archive will continue to run on the server side. When complete, and email will be sent to the email address provided in the initial request with a link to a file to download. In addition to this two step workflow, there is also an option for users who wish to download a single CSV file in direct response to an API request. The .csv format may be used to download a CSV directly. This feature is restricted to use with only a single POINT, for a single YEAR at a time.
GET|POST /api/wave/v2/wave/us-atlantic-hindcast-download.format?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.
Parameter | Required | Value | Description |
---|---|---|---|
api_key | Yes |
Type: string
Default: None
|
Your developer API key. See API keys for more information. |
wkt | Yes |
Type: well-known text string
Default: None
|
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. |
attributes | No |
Type: comma delimited string array
Default: Returns ALL
Options: directionality_coefficient, energy_period, maximum_energy_direction, mean_absolute_period, mean_wave_direction, mean_zero-crossing_period, omni-directional_wave_power, peak_period, significant_wave_height, spectral_width, time_index, water_depth
|
Each specified attribute(*) will be returned as a column in the resultant CSV download. |
names | Yes |
Type: comma delimited string array
Default: None
Options: 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010.
|
The year(s) for which data should be extracted. |
utc | No |
Type: true or false
Default: true
|
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). |
leap_day | No |
Type: true or false
Default: false
|
Pass true to retrieve data including leap day (where appropriate). Pass false to retrieve data excluding leap day. |
interval | Yes |
Type:180
Default: None
|
This value determines data resolution. 180 minute intervals are available. |
full_name | No |
Type: string
Default: None
|
The full name of the user requesting data. |
Yes |
Type: email string
Default: None
|
An active email for the user requesting data. This email will be used to deliver the extracted data. | |
affiliation | No |
Type: string
Default: None
|
The organization with which the user requesting the data is affiliated. |
reason | No |
Type: string
Default: None
|
The reason that the user is requesting the data. |
mailing_list | No |
Type: true or false
Default: false
|
Pass true to add the email address to our list of recipients for the NSRDB mailing list. |
The response is composed of service-related informational fields and the results of the data query.
Field | Value | Description |
---|---|---|
errors |
Type: string array
|
A list of error messages |
inputs |
Type: Object Hash
|
Key: Value pairs representing all input parameters |
outputs |
Type: Object Hash
|
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 |
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.
GET /api/wave/v2/wave/us-atlantic-hindcast-download.json?api_key=DEMO_KEY&full_name=Sample+User&email=user@company.com&affiliation=Test+Organization&reason=Example&mailing_list=true&wkt=POINT (-80.643 24.382)&names=2010&utc=true&leap_day=true
{
"inputs": {
"body": {},
"params": {},
"query": {
"utc": "true",
"leap_day": "true",
"interval": "180",
"email": "user@company.com",
"wkt": "POINT (-80.643 24.382)",
"names": "1979"
}
},
"metadata": {
"version": "2.0.0",
"resultset": {
"count": 1
}
},
"status": 200,
"outputs": {
"message": "File generation in progress. An email will be sent to user@company.com when the download is ready.",
"downloadUrl": "https://mapfiles.nrel.gov/data/wave/f725f109a565fb482c4a99cdac70c6a8.zip"
},
"errors": []
}
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.
GET /api/wave/v2/wave/us-atlantic-hindcast-download.csv?api_key=DEMO_KEY&full_name=Sample+User&email=user@company.com&affiliation=Test+Organization&reason=Example&mailing_list=true&wkt=POINT (-80.643 24.382)&names=1979&utc=true&leap_day=true
Source,Location ID,Jurisdiction,Latitude,Longitude,Time Zone,Local Time Zone,Distance to Shore,Directionality Coefficient,Energy Period,Maximum Energy Direction,Mean Absolute Period,Mean Wave Direction,Mean Zero-Crossing Period,Omni-Directional Wave Power,Peak Period,Significant Wave Height,Spectral Width,Water Depth,Version
NSRDB,124309,b'Federal',24.382,-80.643,0,-5,49913.703,-,s,deg,s,deg,s,W/m,s,m,-,370,v1.0.0
Year,Month,Day,Hour,Minute,Directionality Coefficient,Energy Period,Maximum Energy Direction,Mean Absolute Period,Mean Wave Direction,Mean Zero-Crossing Period,Omni-Directional Wave Power,Peak Period,Significant Wave Height,Spectral Width
1979,1,2,0,0,0,-9999,262.5,-9999,-9999,-9999,0,-9999,0,-9999
1979,1,2,3,0,0.9570000171661377,1.5526000261306763,157.5,1.652999997138977,155.3260040283203,1.7776000499725342,0.013269999995827675,1.9230999946594238,0.005760000087320805,0.22579999268054962
1979,1,2,6,0,0.9580000042915344,1.5509999990463257,157.5,1.6512000560760498,155.86000061035156,1.7753000259399414,0.012900000438094139,1.9230999946594238,0.00570000009611249,0.22529999911785126
1979,1,2,9,0,0.9539999961853027,1.5398000478744507,157.5,1.6385999917984009,156.47999572753906,1.760200023651123,0.011119999922811985,1.9230999946594238,0.005429999902844429,0.22290000319480896
1979,1,2,12,0,0.9409999847412109,1.5296000242233276,157.5,1.6276999711990356,157.87399291992188,1.7484999895095825,0.008369999937713146,1.9230999946594238,0.004840000066906214,0.22310000658035278
import requests
url = "http://developer.nrel.gov/api/wave/v2/wave/us-atlantic-hindcast-download.json?api_key=yourapikeygoeshere"
payload = "full_name=Sample+User&email=user@company.com&affiliation=Test+Organization&reason=Example&mailing_list=true&wkt=POINT (-80.643 24.382)&names=2010&utc=true&leap_day=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)
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.
Standard errors may be returned. In addition, the following service-specific errors may be returned:
HTTP Status Code | Description |
---|---|
400 | Bad Request: When required parameters are missing. |
Ahn, Seongho, V.S. Neary, M.N. Allahdadi, and R. He. 2021. “Nearshore Wave Energy Resource Characterization Along the East Coast of the United States.” Renewable Energy 172 (July 2021): 1212–1224. https://doi.org/10.1016/j.renene.2021.03.037.