Marine Forecast
Marine and sailing weather using Open-Meteo Marine API + Weather API. Free, no API key required, works worldwide.
Two APIs are used together — replace LAT, LON, and TZ in all commands:
- - Marine API (
marine-api.open-meteo.com) — waves, swell, sea temp, currents, tides - Weather API (
api.open-meteo.com) — wind, gusts, air temp, pressure, visibility
Find coordinates for any location using web search or the user's input. Use the nearest timezone (IANA format, e.g. Europe/London, America/New_York, Atlantic/Canary).
Current conditions
Sea state:
CODEBLOCK0
Wind and atmosphere:
CODEBLOCK1
Run both and combine the results into a single briefing.
Hourly forecast
Marine (up to 16 days, adjust forecast_days):
CODEBLOCK2
Wind (up to 16 days):
CODEBLOCK3
Daily summary
Marine:
CODEBLOCK4
Weather:
CODEBLOCK5
Tides (sea level)
CODEBLOCK6
High/low tide: find local maxima and minima in the sea_level_height_msl array. Sea level includes tidal signal + inverted barometer effect.
Ocean currents
CODEBLOCK7
Presenting results
Always present marine data as a structured sailing briefing:
Current conditions format
CODEBLOCK8
Sailing assessment
Rate conditions based on the data:
- - Calm — waves < 0.5m, wind < 12 km/h (Beaufort 0-2)
- Light — waves 0.5-1m, wind 12-19 km/h (Beaufort 3)
- Moderate — waves 1-2m, wind 20-38 km/h (Beaufort 4-5)
- Rough — waves 2-3m, wind 39-49 km/h (Beaufort 6)
- Very Rough — waves 3-4m, wind 50-61 km/h (Beaufort 7)
- Dangerous — waves > 4m or wind > 62 km/h (Beaufort 8+)
Flag warnings:
- - Small craft advisory: wind gusts > 50 km/h or wave height > 3m
- Gale warning: sustained wind > 62 km/h or wave height > 5m
- Suggest activity suitability: sailing, diving, fishing, swimming, surfing
Beaufort scale
| Force | km/h | Description | Sea State |
|---|
| 0 | 0-1 | Calm | Flat |
| 1 |
2-5 | Light air | Ripples |
| 2 | 6-11 | Light breeze | Small wavelets |
| 3 | 12-19 | Gentle breeze | Large wavelets |
| 4 | 20-28 | Moderate breeze | Small waves |
| 5 | 29-38 | Fresh breeze | Moderate waves |
| 6 | 39-49 | Strong breeze | Large waves |
| 7 | 50-61 | Near gale | Breaking waves |
| 8 | 62-74 | Gale | High waves |
| 9 | 75-88 | Severe gale | Very high waves |
| 10 | 89-102 | Storm | Exceptionally high waves |
Wind direction conversion
Convert degrees to compass: divide by 22.5, round, index into [N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW].
Quick reference: 0=N, 45=NE, 90=E, 135=SE, 180=S, 225=SW, 270=W, 315=NW.
Units
| Measurement | Unit |
|---|
| Wave height | meters (m) |
| Wave period |
seconds (s) |
| Wind speed | km/h |
| Temperature | Celsius (C) |
| Current velocity | km/h |
| Directions | degrees (0=N, 90=E, 180=S, 270=W) |
| Sea level | meters relative to MSL |
| Visibility | meters |
| Pressure | hPa |
Users may prefer knots for wind. Convert: knots = km/h * 0.539957. Add &wind_speed_unit=kn to the weather API URL to get knots directly.
Popular sailing locations (reference)
| Region | Example | Lat | Lon |
|---|
| Canary Islands | Las Palmas | 28.1 | -15.4 |
| Balearics |
Palma de Mallorca | 39.57 | 2.65 |
| Greek Islands | Piraeus | 37.94 | 23.65 |
| Croatia | Split | 43.51 | 16.44 |
| Caribbean | St. Maarten | 18.04 | -63.05 |
| South Pacific | Tahiti | -17.53 | -149.57 |
| Southeast Asia | Phuket | 7.88 | 98.39 |
| East Africa | Zanzibar | -6.16 | 39.19 |
| Australia | Sydney | -33.87 | 151.21 |
| US East Coast | Annapolis | 38.97 | -76.49 |
| UK | Solent | 50.77 | -1.30 |
| Scandinavia | Gothenburg | 57.71 | 11.97 |
Data sources
- - ECMWF WAM (European Centre for Medium-Range Weather Forecasts)
- NOAA GFS Wave (Global Forecast System)
- DWD GWAM/EWAM (German Weather Service)
- Resolution: 5-25 km depending on region and model
- Updates: multiple times per day
- Forecast range: up to 16 days (
forecast_days=16)
Notes
- - All data is JSON. Parse with
jq if available, otherwise read raw JSON. - Hourly data returns large arrays. For quick checks, use
current parameters. For planning, use daily. Use hourly only when the user needs detailed breakdowns. - Combine marine + weather API calls to give a complete picture. Neither alone is sufficient for a full sailing briefing.
- Sea level data approximates tides but does not label high/low explicitly. Derive from local maxima/minima in the hourly array.
- For coastal areas, data accuracy depends on proximity to the nearest grid point. Open ocean coverage is excellent; harbors and bays may be less precise.
Docs: https://open-meteo.com/en/docs/marine-weather-api
海洋预报
使用Open-Meteo海洋API和天气API获取航海和帆船天气。免费,无需API密钥,全球适用。
两个API配合使用——在所有命令中替换LAT、LON和TZ:
- - 海洋API(marine-api.open-meteo.com)——海浪、涌浪、海水温度、洋流、潮汐
- 天气API(api.open-meteo.com)——风、阵风、气温、气压、能见度
通过网络搜索或用户输入获取任意位置的坐标。使用最近的时区(IANA格式,例如Europe/London、America/New_York、Atlantic/Canary)。
当前状况
海况:
bash
curl -s https://marine-api.open-meteo.com/v1/marine?latitude=LAT&longitude=LON¤t=waveheight,wavedirection,waveperiod,swellwaveheight,swellwavedirection,swellwaveperiod,seasurface_temperature&timezone=TZ
风和大气:
bash
curl -s https://api.open-meteo.com/v1/forecast?latitude=LAT&longitude=LON¤t=temperature2m,windspeed10m,winddirection10m,windgusts10m,apparenttemperature,pressuremsl,cloudcover,visibility&timezone=TZ
运行两者并将结果合并为一份简报。
逐时预报
海洋(最多16天,调整forecast_days):
bash
curl -s https://marine-api.open-meteo.com/v1/marine?latitude=LAT&longitude=LON&hourly=waveheight,wavedirection,waveperiod,swellwaveheight,swellwavedirection,swellwaveperiod,swellwavepeakperiod,windwaveheight,windwavedirection,seasurfacetemperature,oceancurrentvelocity,oceancurrentdirection,sealevelheightmsl&forecastdays=3&timezone=TZ
风(最多16天):
bash
curl -s https://api.open-meteo.com/v1/forecast?latitude=LAT&longitude=LON&hourly=windspeed10m,winddirection10m,windgusts10m,temperature2m,pressuremsl,visibility,cloudcover,precipitationprobability&forecast_days=3&timezone=TZ
每日摘要
海洋:
bash
curl -s https://marine-api.open-meteo.com/v1/marine?latitude=LAT&longitude=LON&daily=waveheightmax,wavedirectiondominant,waveperiodmax,swellwaveheightmax,swellwavedirectiondominant,swellwaveperiodmax&forecastdays=7&timezone=TZ
天气:
bash
curl -s https://api.open-meteo.com/v1/forecast?latitude=LAT&longitude=LON&daily=windspeed10mmax,windgusts10mmax,winddirection10mdominant,temperature2mmax,temperature2mmin,sunrise,sunset,uvindexmax,precipitationprobabilitymax&forecastdays=7&timezone=TZ
潮汐(海平面)
bash
curl -s https://marine-api.open-meteo.com/v1/marine?latitude=LAT&longitude=LON&hourly=sealevelheightmsl&forecastdays=3&timezone=TZ
高潮/低潮:在sealevelheight_msl数组中查找局部最大值和最小值。海平面包括潮汐信号和反气压计效应。
洋流
bash
curl -s https://marine-api.open-meteo.com/v1/marine?latitude=LAT&longitude=LON&hourly=oceancurrentvelocity,oceancurrentdirection&forecast_days=3&timezone=TZ
呈现结果
始终以结构化的航海简报形式呈现海洋数据:
当前状况格式
海况: [waveheight]米浪高,[waveperiod]秒周期,来自[direction]方向
涌浪: [swellwaveheight]米来自[direction]方向,[swellwaveperiod]秒周期
风: [windspeed]公里/小时[direction]方向,阵风[windgusts]公里/小时
温度: 空气[温度]°C(体感[体感温度]°C),海水[seasurfacetemperature]°C
天空: [cloud_cover]%云量,[visibility/1000]公里能见度
航行评估
根据数据评估状况:
- - 平静——浪高<0.5米,风速<12公里/小时(蒲福风级0-2)
- 轻风——浪高0.5-1米,风速12-19公里/小时(蒲福风级3)
- 适中——浪高1-2米,风速20-38公里/小时(蒲福风级4-5)
- 汹涌——浪高2-3米,风速39-49公里/小时(蒲福风级6)
- 非常汹涌——浪高3-4米,风速50-61公里/小时(蒲福风级7)
- 危险——浪高>4米或风速>62公里/小时(蒲福风级8+)
警示标志:
- - 小型船只预警:阵风>50公里/小时或浪高>3米
- 大风警报:持续风速>62公里/小时或浪高>5米
- 建议活动适宜性:帆船、潜水、钓鱼、游泳、冲浪
蒲福风级表
2-5 | 软风 | 涟漪 |
| 2 | 6-11 | 轻风 | 小波 |
| 3 | 12-19 | 微风 | 中波 |
| 4 | 20-28 | 和风 | 小浪 |
| 5 | 29-38 | 清风 | 中浪 |
| 6 | 39-49 | 强风 | 大浪 |
| 7 | 50-61 | 疾风 | 碎浪 |
| 8 | 62-74 | 大风 | 巨浪 |
| 9 | 75-88 | 烈风 | 非常巨浪 |
| 10 | 89-102 | 暴风 | 异常巨浪 |
风向转换
将度数转换为罗盘方向:除以22.5,四舍五入,索引到[北, 北北东, 东北, 东北东, 东, 东南东, 东南, 南南东, 南, 南南西, 西南, 西南西, 西, 西北西, 西北, 北北西]。
快速参考:0=北,45=东北,90=东,135=东南,180=南,225=西南,270=西,315=西北。
单位
秒(s) |
| 风速 | 公里/小时 |
| 温度 | 摄氏度(°C) |
| 洋流速度 | 公里/小时 |
| 方向 | 度(0=北,90=东,180=南,270=西) |
| 海平面 | 相对于平均海平面的米数 |
| 能见度 | 米 |
| 气压 | 百帕 |
用户可能偏好节作为风速单位。转换:节 = 公里/小时 * 0.539957。在天气API URL中添加&windspeedunit=kn可直接获取节。
热门航行地点(参考)
| 区域 | 示例 | 纬度 | 经度 |
|---|
| 加那利群岛 | 拉斯帕尔马斯 | 28.1 | -15.4 |
| 巴利阿里群岛 |
帕尔马德马略卡 | 39.57 | 2.65 |
| 希腊群岛 | 比雷埃夫斯 | 37.94 | 23.65 |
| 克罗地亚 | 斯普利特 | 43.51 | 16.44 |
| 加勒比海 | 圣马丁 | 18.04 | -63.05 |
| 南太平洋 | 塔希提 | -17.53 | -149.57 |
| 东南亚 | 普吉岛 | 7.88 | 98.39