Marine Weather

Gives access to our advanced Marine Weather data.

Restful endpoints in the Marine Weather API provide a few different types of information:

Data type

Description

Weather object metadata

These endpoints provide information about currently available models, variables, and categories of data that can be used throughout the Weather API.

Forecast data

These endpoints can be used to retrieve forecast output for specific times and locations.

Hindcast data

These endpoints can be used to retrieve hindcast output for specific times and locations.

Available Variables

More metadata on each model and variable is available using the Weather Object Metadata endpoints.

Sofar Waves

Variable

Significant Wave Height

SofarOperationalWaveModel-significantWaveHeight

Mean Wave Direction

SofarOperationalWaveModel-meanDirection

Mean Wave Directional Spread

SofarOperationalWaveModel-meanDirectionalSpread

Mean Wave Period

SofarOperationalWaveModel-meanPeriod

Peak Wave Frequency

SofarOperationalWaveModel-peakFrequency

Peak Wave Direction

SofarOperationalWaveModel-peakDirection

Significant Wind Wave Height

SofarOperationalWaveModel-significantWaveHeightWindWaves

Mean Wind Wave Direction

SofarOperationalWaveModel-meanDirectionWindWaves

Mean Wind Wave Directional Spread

SofarOperationalWaveModel-meanDirectionalSpreadWindWaves

Peak Wind Wave Period

SofarOperationalWaveModel-peakPeriodWindWaves

Significant First Swell Wave Height

SofarOperationalWaveModel-significantWaveHeightFirstSwell

Mean First Swell Direction

SofarOperationalWaveModel-meanDirectionFirstSwell

Mean First Swell Directional Spread

SofarOperationalWaveModel-meanDirectionalSpreadFirstSwell

Peak First Swell Period

SofarOperationalWaveModel-peakPeriodFirstSwell

Significant Second Swell Wave Height

SofarOperationalWaveModel-significantWaveHeightSecondSwell

Mean Second Swell Direction

SofarOperationalWaveModel-meanDirectionSecondSwell

Mean Second Swell Directional Spread

SofarOperationalWaveModel-meanDirectionalSpreadSecondSwell

Peak Second Swell Period

SofarOperationalWaveModel-peakPeriodSecondSwell

Significant Third Swell Wave Height

SofarOperationalWaveModel-significantWaveHeightThirdSwell

Mean Third Swell Direction

SofarOperationalWaveModel-meanDirectionThirdSwell

Mean Third Swell Directional Spread

SofarOperationalWaveModel-meanDirectionalSpreadThirdSwell

Peak Third Swell Peak Period

SofarOperationalWaveModel-peakPeriodThirdSwell

NOAA Waves

Variable

Significant Wave Height

NOAAOperationalWaveModel-significantWaveHeight

Wave Direction

NOAAOperationalWaveModel-primaryWaveDirection

Peak Wave Period

NOAAOperationalWaveModel-peakPeriod

Significant Wind Wave Height

NOAAOperationalWaveModel-significantWaveHeightWindWaves

Mean Wind Wave Period

NOAAOperationalWaveModel-meanPeriodWindWaves

Mean Wind Wave Direction

NOAAOperationalWaveModel-meanDirectionWindWaves

Sea Surface Temperature

Variable

Sea Surface Temperature

HYCOM-seaSurfaceTemperature

Currents

Variable

Surface Current Velocity

HYCOM-magnitudeWaterVelocity

Surface Current Velocity Direction

HYCOM-directionWaterVelocity

Eastward Surface Current Velocity

HYCOM-surfaceCurrentVelocityEastward

Westward Surface Current Velocity

HYCOM-surfaceCurrentVelocityNorthward

Winds

Variable

Wind Velocity

GFS-magnitude10MeterWind

Wind Direction

GFS-direction10MeterWind

Eastward Wind Velocity

GFS-windVelocity10MeterEastward

Northward Wind Velocity

GFS-windVelocity10MeterNorthward

How to get a current marine weather forecast

Retrieving a current marine weather forecast is as simple as making a HTTP GET request to the correct URL with a valid API token. Here's an example:

https://api.sofarocean.com/marine-weather/v1/models/SofarOperationalWaveModel/forecast/point?longitude=-152.0001&latitude=37.0001&variableIDs=SofarOperationalWaveModel-significantWaveHeight,SofarOperationalWaveModel-meanDirection&token=YOUR_API_TOKEN

An example request in Python might look like:

get_forecast.py
import requests
params = {
'token': 'YOUR_API_TOKEN',
'longitude': -152.0001,
'latitude': 37.0001,
'variableIDs': ['SofarOperationalWaveModel-significantWaveHeight', 'SofarOperationalWaveModel-meanDirection']
}
response = requests.get(
url='https://api.sofarocean.com/marine-weather/v1/models/SofarOperationalWaveModel/forecast/point',
params=params )
data = response.json()
print(data)