lat
and lon
path parameters excluded.{"status": "success","data": [{"latitude": 34.5,"longitude": 200.0,"url": "https://api.sofarocean.com/api/op-wave-spectra/34.5/200"}]}
curl https://api.sofarocean.com/api/op-wave-spectra -H 'token: YOUR_API_TOKEN'
Content-Type: application/octet-stream Content-Disposition: attachment; filename="34.50_200.00_2019-12-19T12:00:00Z_data.netcdf"
curl https://api.sofarocean.com/api/op-wave-spectra/34.5/200 -H 'token: YOUR_API_TOKEN' -J -O
A Sofar spectral output file contains the variance density spectrum at a single grid point from the Sofar global wave model at an hourly resolution for the duration of the entire forecast. The data is stored in NetCDF format, and the variables contained in each forecast file are listed in Table 1. A detailed description of the variables is given below.
Variable Name | Shape | Type | Units |
directions | ( Nd , ) | float | Degrees |
frequencies | ( Nf , ) | float | Hertz |
time | ( Nt , ) | integer | Seconds |
latitude | ( 1 , ) | float | Decimal degrees |
longitude | ( 1, ) | float | Decimal degrees |
depth | ( 1, ) | float | Meters |
frequency direction spectrum | ( Nt , Nd , Nf ) | float | Meters2/Hertz/Degree |
Table 1: The shape column indicates the shape of the array containing the variable, with Nt denoting the number of entries in time, Nf the number of frequencies and Nd the number of directions.
The direction vector contains the model directions at which the spectrum is stored. The directions are stored as a single vector of Nd=36 entries. Directions are measured counterclockwise from East. Each direction is given in degrees (ranging between [0,360) ) and indicates the direction the waves are traveling in. The directional grid has a constant resolution of 10 degrees.
The frequency vector contains the model directions at which the spectrum is stored. The frequencies are stored as a single vector of Nf=36 entries. Frequencies are measured in Hertz. The frequencies are defined on a logarithmic grid (1.1 growth factor) with minimum frequency f=0.035 Hz and maximum frequency f=0.98 Hz.
The time vector denotes the time of the spectral entries. Time is denoted in Unix Epoch time, i.e. as seconds elapsed since Jan 1, 1970 (UTC). For forecast spectra the time vector contains Nt=169 entries at hourly intervals (7 days). The first entry denoting the starting point of the forecast.
The latitude and longitude are denoted in decimal degrees and indicate the location of the model gridpoint the spectrum originated from.
Depth denotes the depth in meters at the location considered.
The frequency direction spectrum contains the binned spectral density levels as a function of time, direction and frequency. Specifically, spectra are stored as a three dimensional array where the first dimension is time, the second dimension is direction and the third is frequency. Entries are stored as density values with units m2/Hz/Deg.