Skip to content

Open-Meteo

Try it in your browser

Open-Meteo weather — forecasts, history, air quality, marine, flood and climate data

Connector software
Free and open source
Service credentials
Not needed
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/open-meteo/index.md to help me query Open-Meteo with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Try it in your browser Haybarn WASM · nothing to install

Try it in your browser

Run a live query with no installation or account. Your browser connects to the public Open-Meteo demo hosted by Query Farm: three-day forecast for Berlin and Tokyo.

Example output · captured
Connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
open_meteo.sql
ATTACH 'open_meteo' AS open_meteo (TYPE vgi, LOCATION 'https://open-meteo.vgi.query.farm');

SELECT 'Berlin' AS city, time::DATE AS day,
       temperature_2m_max AS high_c, temperature_2m_min AS low_c
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 3, timezone := 'UTC')
UNION ALL
SELECT 'Tokyo' AS city, time::DATE AS day,
       temperature_2m_max AS high_c, temperature_2m_min AS low_c
FROM open_meteo.main.forecast_daily(35.68, 139.69, forecast_days := 3, timezone := 'UTC')
ORDER BY city, day;
Result · first 5 rows
city day high_c low_c
Berlin 2026-12-01 4.6 0
Berlin 2026-12-02 3.8 -0.3
Berlin 2026-12-03 7.1 1.2
Tokyo 2026-12-01 18.8 8.1
Tokyo 2026-12-02 16.9 9.5

Runs in your browser and attaches the public demo Query.Farm hosts on Cloudflare (open-meteo.vgi.query.farm). The first run downloads the engine; the SQL shell keeps the worker attached so you can write your own queries.

Quick start

Choose where to run Open-Meteo, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

attach.sql
ATTACH 'open_meteo' AS open_meteo (
  TYPE vgi,
  LOCATION 'https://open-meteo.vgi.query.farm'
);

3. Run a query

query.sql
SELECT 'Berlin' AS city, time::DATE AS day,
       temperature_2m_max AS high_c, temperature_2m_min AS low_c
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 3, timezone := 'UTC')
UNION ALL
SELECT 'Tokyo' AS city, time::DATE AS day,
       temperature_2m_max AS high_c, temperature_2m_min AS low_c
FROM open_meteo.main.forecast_daily(35.68, 139.69, forecast_days := 3, timezone := 'UTC')
ORDER BY city, day
More example queries →
Technical details
Verified connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

The public demo follows the release deployed by Query Farm. To control the version, deploy the release source on a server you manage, then connect to your endpoint.

Overview

Weather, air-quality, marine, flood, climate, geocoding & elevation (Open-Meteo)

ATTACH options

apikey
Open-Meteo commercial API key. Omit for the free tier. When set, requests use the customer-* API hosts.VARCHAR

Catalog

Everything open_meteo exposes once attached — read straight from the worker's released build.

open_meteo 1 schema
main 1 view · 16 functions · 6 macros

Open-Meteo weather, climate, air-quality, marine, flood, geocoding & elevation functions.

Schema examples (8)
Examples (8)

Current conditions in Berlin, weather code decoded to text.

SELECT temperature_2m,
  open_meteo.main.weather_code_text(weather_code) AS conditions
FROM open_meteo.main.forecast_current(52.52, 13.41);

Geocode a place name; its coordinates feed the forecast functions.

SELECT name, latitude, longitude
FROM open_meteo.main.geocoding('Paris', count := 1);

The usual starting point: a place name joined straight through to its current weather.

SELECT g.name, w.temperature_2m,
  open_meteo.main.weather_code_text(w.weather_code) AS conditions
FROM open_meteo.main.geocoding('Paris', count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;

A column of place names geocoded and forecast in one query, each city's days in its own local time ('auto' is resolved from each row's coordinates).

SELECT p.city, d.time, d.temperature_2m_max
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_daily(g.latitude, g.longitude, forecast_days := 3, timezone := 'auto') AS d
ORDER BY p.city, d.time;
4 more examples

Planning an outdoor run: the dry hours of Berlin's next two days, cleanest air first — the hourly weather forecast joined to the air-quality forecast on the same UTC hour, with the European AQI decoded to its band.

SELECT w.time, w.temperature_2m, a.european_aqi,
  open_meteo.main.european_aqi_category(a.european_aqi) AS air_quality
FROM open_meteo.main.forecast_hourly(52.52, 13.41, forecast_days := 2) AS w
JOIN open_meteo.main.air_quality_hourly(52.52, 13.41, forecast_days := 2) AS a ON a.time = w.time
WHERE w.precipitation = 0
ORDER BY a.european_aqi, w.time
LIMIT 10;

Surf check for a beach named rather than located: geocode Scheveningen once, then line up its hourly wave height and period with the land forecast's wind speed and compass direction at the same point.

SELECT m.time, m.wave_height, m.wave_period, f.wind_speed_10m,
  open_meteo.main.wind_compass(f.wind_direction_10m) AS wind_from
FROM open_meteo.main.geocoding('Scheveningen', count := 1) AS g,
     LATERAL open_meteo.main.marine_hourly(g.latitude, g.longitude, forecast_days := 2) AS m
JOIN open_meteo.main.forecast_hourly(g.latitude, g.longitude, forecast_days := 2) AS f ON f.time = m.time
ORDER BY m.time;

How sure is the forecast? Berlin's best-match daily high for the next 5 local days next to the lowest and highest of the GFS ensemble members — days where the forecast high falls outside that range disagree with the whole ensemble.

SELECT f.date, f.temperature_2m_max AS forecast_high,
  list_min(list_value(*COLUMNS('temperature_2m_max_member\d+'))) AS members_low,
  list_max(list_value(*COLUMNS('temperature_2m_max_member\d+'))) AS members_high
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 5, timezone := 'auto') AS f
JOIN open_meteo.main.ensemble_daily(52.52, 13.41, forecast_days := 5, timezone := 'auto') AS e ON e.date = f.date
ORDER BY f.date;

This week against the same week last year: Berlin's daily forecast high joined to the reanalysis high for the same calendar date one year earlier (the archive window is computed from today, so the query never needs editing).

SELECT f.date, f.temperature_2m_max AS forecast_high,
  h.temperature_2m_max AS last_year_high,
  round(f.temperature_2m_max - h.temperature_2m_max, 1) AS warmer_by
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 7) AS f
JOIN open_meteo.main.historical_daily(52.52, 13.41, strftime(current_date - INTERVAL 1 YEAR - INTERVAL 1 DAY, '%Y-%m-%d'), strftime(current_date - INTERVAL 1 YEAR + INTERVAL 8 DAY, '%Y-%m-%d')) AS h ON h.date = CAST(f.date - INTERVAL 1 YEAR AS DATE)
ORDER BY f.date;
Views
weather_codes 3 examples3 cols

WMO 4677 weather-code reference: numeric code → text description and emoji.

Columns
code INTEGER
WMO 4677 weather-interpretation code (as returned by forecast/historical weather_code).
description VARCHAR
Human-readable English description of the code.
emoji VARCHAR
A representative weather emoji for the code.
Examples (3)

Label a forecast by joining to the code table.

SELECT f.time, w.description, w.emoji
FROM open_meteo.main.forecast_hourly(52.52, 13.41, forecast_days := 1) f
JOIN open_meteo.main.weather_codes w ON w.code = f.weather_code
ORDER BY f.time;

Same, for a place named rather than located: geocode, forecast, then label.

SELECT g.name, f.time, w.description, w.emoji
FROM open_meteo.main.geocoding('Oslo', count := 1) AS g,
     LATERAL open_meteo.main.forecast_hourly(g.latitude, g.longitude, forecast_days := 1) AS f
JOIN open_meteo.main.weather_codes w ON w.code = f.weather_code
ORDER BY f.time;

Browse the lookup on its own — no arguments needed.

SELECT code, description, emoji
FROM open_meteo.main.weather_codes
ORDER BY code;
Link
Table functions
air_quality_current (latitude DOUBLE, longitude DOUBLE, timezone := VARCHAR) 4 examples

Current air-quality (pollutants + AQI) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of the current conditions (UTC).
pm10 DOUBLE
Open-Meteo variable; API default unit.
pm2_5 DOUBLE
Open-Meteo variable; API default unit.
carbon_monoxide DOUBLE
Open-Meteo variable; API default unit.
nitrogen_dioxide DOUBLE
Open-Meteo variable; API default unit.
sulphur_dioxide DOUBLE
Open-Meteo variable; API default unit.
ozone DOUBLE
Open-Meteo variable; API default unit.
dust DOUBLE
Open-Meteo variable; API default unit.
uv_index DOUBLE
Open-Meteo variable; API default unit.
european_aqi INTEGER
Open-Meteo variable; API default unit.
us_aqi INTEGER
Open-Meteo variable; API default unit.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
Examples (4)

Current air-quality (pollutants + AQI) for a coordinate (Berlin).

SELECT time, pm10, pm2_5
FROM open_meteo.main.air_quality_current(52.52, 13.41);

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.pm10
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.air_quality_current(c.lat, c.lon) AS w;

Current air-quality (pollutants + AQI) for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.pm10
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.air_quality_current(g.latitude, g.longitude) AS w;
1 more example

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.pm10
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.air_quality_current(g.latitude, g.longitude) AS w;
Link
air_quality_hourly (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, past_days := BIGINT, timezone := VARCHAR) 8 examples

Hourly air-quality (pollutants + AQI) forecast for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 5
past_days := BIGINT
Number of past days to include. · default 0
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of this hourly step (UTC).
pm10 DOUBLE
Open-Meteo variable; API default unit.
pm2_5 DOUBLE
Open-Meteo variable; API default unit.
carbon_monoxide DOUBLE
Open-Meteo variable; API default unit.
nitrogen_dioxide DOUBLE
Open-Meteo variable; API default unit.
sulphur_dioxide DOUBLE
Open-Meteo variable; API default unit.
ozone DOUBLE
Open-Meteo variable; API default unit.
dust DOUBLE
Open-Meteo variable; API default unit.
uv_index DOUBLE
Open-Meteo variable; API default unit.
european_aqi INTEGER
Open-Meteo variable; API default unit.
us_aqi INTEGER
Open-Meteo variable; API default unit.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
Examples (8)

Hourly air-quality (pollutants + AQI) forecast for a coordinate (Berlin).

SELECT time, pm10, pm2_5
FROM open_meteo.main.air_quality_hourly(52.52, 13.41)
ORDER BY time;

Planning an outdoor run: the dry hours of Berlin's next two days, cleanest air first — the hourly weather forecast joined to the air-quality forecast on the same UTC hour, with the European AQI decoded to its band.

SELECT w.time, w.temperature_2m, a.european_aqi,
  open_meteo.main.european_aqi_category(a.european_aqi) AS air_quality
FROM open_meteo.main.forecast_hourly(52.52, 13.41, forecast_days := 2) AS w
JOIN open_meteo.main.air_quality_hourly(52.52, 13.41, forecast_days := 2) AS a ON a.time = w.time
WHERE w.precipitation = 0
ORDER BY a.european_aqi, w.time
LIMIT 10;

Next 3 days, daily buckets in the location's local time zone.

SELECT time, pm10, pm2_5
FROM open_meteo.main.air_quality_hourly(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY time;
5 more examples

The past 7 days instead of the forecast window.

SELECT time, pm10, pm2_5
FROM open_meteo.main.air_quality_hourly(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY time;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.pm10
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.air_quality_hourly(c.lat, c.lon) AS w;

Hourly air-quality (pollutants + AQI) forecast for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.pm10
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.air_quality_hourly(g.latitude, g.longitude) AS w
ORDER BY w.time;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.pm10
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.air_quality_hourly(g.latitude, g.longitude) AS w;

Several places, each window starting at its own local midnight: 'auto' resolves the zone per row.

SELECT p.city, w.time, w.pm10
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.air_quality_hourly(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.time;
Link
climate_daily (latitude DOUBLE, longitude DOUBLE, start_date VARCHAR, end_date VARCHAR, models := VARCHAR, timezone := VARCHAR) 6 examples

Daily downscaled climate-change projections (1950→2050) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
start_date VARCHAR
Start date, yyyy-mm-dd (inclusive).
end_date VARCHAR
End date, yyyy-mm-dd (inclusive).
Named arguments
models := VARCHAR
Comma-separated model ids (empty = Open-Meteo default). · default "MRI_AGCM3_2_S"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "auto"
Returns columns
time TIMESTAMP WITH TIME ZONE
Start of the day this row aggregates (UTC).
date DATE
Provider's day label in the requested timezone (default auto). Uses the response's fixed UTC offset, ignoring DST changes within it.
temperature_2m_max DOUBLE
Open-Meteo variable; API default unit.
temperature_2m_min DOUBLE
Open-Meteo variable; API default unit.
temperature_2m_mean DOUBLE
Open-Meteo variable; API default unit.
precipitation_sum DOUBLE
Open-Meteo variable; API default unit.
rain_sum DOUBLE
Open-Meteo variable; API default unit.
snowfall_sum DOUBLE
Open-Meteo variable; API default unit.
wind_speed_10m_max DOUBLE
Open-Meteo variable; API default unit.
shortwave_radiation_sum DOUBLE
Open-Meteo variable; API default unit.
Examples (6)

Daily downscaled climate-change projections (1950→2050) for a coordinate over an explicit date range (Berlin).

SELECT date, temperature_2m_max, temperature_2m_min
FROM open_meteo.main.climate_daily(52.52, 13.41, '2024-06-01', '2024-06-07')
ORDER BY date;

Pick specific downscaled climate models.

SELECT date, temperature_2m_max, temperature_2m_min
FROM open_meteo.main.climate_daily(52.52, 13.41, '2040-01-01', '2040-12-31', models := 'MRI_AGCM3_2_S,EC_Earth3P_HR')
ORDER BY date;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.date, w.temperature_2m_max
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.climate_daily(c.lat, c.lon, '2024-06-01', '2024-06-07') AS w;
3 more examples

Daily downscaled climate-change projections (1950→2050) for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.date, w.temperature_2m_max
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.climate_daily(g.latitude, g.longitude, '2024-06-01', '2024-06-07') AS w
ORDER BY w.date;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.date, w.temperature_2m_max
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.climate_daily(g.latitude, g.longitude, '2024-06-01', '2024-06-07') AS w;

Several places, each bucketed in its own local day: 'auto' resolves the zone from each row's coordinates.

SELECT p.city, w.date, w.temperature_2m_max
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.climate_daily(g.latitude, g.longitude, '2024-06-01', '2024-06-07', timezone := 'auto') AS w
ORDER BY p.city, w.date;
Link
elevation (latitude DOUBLE, longitude DOUBLE) 5 examples

Terrain elevation (90m DEM) for a coordinate (Open-Meteo elevation).

Arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Returns columns
latitude DOUBLE
Requested latitude (WGS84).
longitude DOUBLE
Requested longitude (WGS84).
elevation DOUBLE
Terrain elevation in metres (90m DEM).
Examples (5)

Terrain elevation at Berlin (metres).

SELECT elevation FROM open_meteo.main.elevation(52.52, 13.41);

Near the summit of Everest.

SELECT latitude, longitude, elevation
FROM open_meteo.main.elevation(27.99, 86.93);

Elevation for a whole table of coordinates in one correlated join.

SELECT c.name, e.elevation
FROM (VALUES ('Berlin', 52.52, 13.41), ('Everest', 27.99, 86.93)) AS c(name, lat, lon),
     LATERAL open_meteo.main.elevation(c.lat, c.lon) AS e;
2 more examples

Elevation for a place looked up by name rather than by coordinate.

SELECT g.name, e.elevation
FROM open_meteo.main.geocoding('Denver', count := 1) AS g,
     LATERAL open_meteo.main.elevation(g.latitude, g.longitude) AS e;

Rank a column of place names by terrain height, geocoding each one.

SELECT p.city, e.elevation
FROM (VALUES ('Denver'), ('La Paz'), ('Amsterdam')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.elevation(g.latitude, g.longitude) AS e
ORDER BY e.elevation DESC;
Link
ensemble_daily (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, models := VARCHAR, past_days := BIGINT, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 10 examples

Daily ensemble maximum temperature: control run plus up to 30 perturbed members.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 7
models := VARCHAR
Comma-separated model ids (empty = Open-Meteo default). · default "gfs_seamless"
past_days := BIGINT
Number of past days to include. · default 0
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "auto"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Start of the day this row aggregates (UTC).
date DATE
Provider's day label in the requested timezone (default auto). Uses the response's fixed UTC offset, ignoring DST changes within it.
temperature_2m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member01 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member02 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member03 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member04 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member05 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member06 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member07 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member08 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member09 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member10 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member11 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member12 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member13 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member14 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member15 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member16 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member17 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member18 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member19 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member20 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member21 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member22 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member23 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member24 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member25 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member26 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member27 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member28 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member29 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_max_member30 DOUBLE
Open-Meteo variable; unit per *_unit args.
Examples (10)

Daily ensemble maximum temperature: control run plus up to 30 perturbed members (Berlin).

SELECT date, temperature_2m_max, temperature_2m_max_member01
FROM open_meteo.main.ensemble_daily(52.52, 13.41)
ORDER BY date;

How sure is the forecast? Berlin's best-match daily high for the next 5 local days next to the lowest and highest of the GFS ensemble members — days where the forecast high falls outside that range disagree with the whole ensemble.

SELECT f.date, f.temperature_2m_max AS forecast_high,
  list_min(list_value(*COLUMNS('temperature_2m_max_member\d+'))) AS members_low,
  list_max(list_value(*COLUMNS('temperature_2m_max_member\d+'))) AS members_high
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 5, timezone := 'auto') AS f
JOIN open_meteo.main.ensemble_daily(52.52, 13.41, forecast_days := 5, timezone := 'auto') AS e ON e.date = f.date
ORDER BY f.date;

Next 3 days, daily buckets in the location's local time zone.

SELECT date, temperature_2m_max, temperature_2m_max_member01
FROM open_meteo.main.ensemble_daily(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY date;
7 more examples

The past 7 days instead of the forecast window.

SELECT date, temperature_2m_max, temperature_2m_max_member01
FROM open_meteo.main.ensemble_daily(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY date;

Imperial units (°F, mph).

SELECT date, temperature_2m_max, temperature_2m_max_member01
FROM open_meteo.main.ensemble_daily(52.52, 13.41, temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY date;

Pick a specific weather model rather than the default blend.

SELECT date, temperature_2m_max, temperature_2m_max_member01
FROM open_meteo.main.ensemble_daily(52.52, 13.41, models := 'gfs_seamless')
ORDER BY date;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.date, w.temperature_2m_max
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.ensemble_daily(c.lat, c.lon) AS w;

Daily ensemble maximum temperature: control run plus up to 30 perturbed members, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.date, w.temperature_2m_max
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.ensemble_daily(g.latitude, g.longitude) AS w
ORDER BY w.date;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.date, w.temperature_2m_max
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.ensemble_daily(g.latitude, g.longitude) AS w;

Several places, each bucketed in its own local day: 'auto' resolves the zone from each row's coordinates.

SELECT p.city, w.date, w.temperature_2m_max
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.ensemble_daily(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.date;
Link
ensemble_hourly (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, models := VARCHAR, past_days := BIGINT, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 9 examples

Hourly ensemble forecast: control run plus up to 30 perturbed members, one column each.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 7
models := VARCHAR
Comma-separated model ids (empty = Open-Meteo default). · default "gfs_seamless"
past_days := BIGINT
Number of past days to include. · default 0
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of this hourly step (UTC).
temperature_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member01 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member02 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member03 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member04 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member05 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member06 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member07 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member08 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member09 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member10 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member11 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member12 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member13 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member14 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member15 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member16 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member17 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member18 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member19 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member20 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member21 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member22 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member23 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member24 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member25 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member26 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member27 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member28 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member29 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_member30 DOUBLE
Open-Meteo variable; unit per *_unit args.
Examples (9)

Hourly ensemble forecast: control run plus up to 30 perturbed members, one column each (Berlin).

SELECT time, temperature_2m, temperature_2m_member01
FROM open_meteo.main.ensemble_hourly(52.52, 13.41)
ORDER BY time;

Next 3 days, daily buckets in the location's local time zone.

SELECT time, temperature_2m, temperature_2m_member01
FROM open_meteo.main.ensemble_hourly(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY time;

The past 7 days instead of the forecast window.

SELECT time, temperature_2m, temperature_2m_member01
FROM open_meteo.main.ensemble_hourly(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY time;
6 more examples

Imperial units (°F, mph).

SELECT time, temperature_2m, temperature_2m_member01
FROM open_meteo.main.ensemble_hourly(52.52, 13.41, temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY time;

Pick a specific weather model rather than the default blend.

SELECT time, temperature_2m, temperature_2m_member01
FROM open_meteo.main.ensemble_hourly(52.52, 13.41, models := 'gfs_seamless')
ORDER BY time;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.ensemble_hourly(c.lat, c.lon) AS w;

Hourly ensemble forecast: control run plus up to 30 perturbed members, one column each, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.temperature_2m
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.ensemble_hourly(g.latitude, g.longitude) AS w
ORDER BY w.time;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.ensemble_hourly(g.latitude, g.longitude) AS w;

Several places, each window starting at its own local midnight: 'auto' resolves the zone per row.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.ensemble_hourly(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.time;
Link
flood_daily (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, past_days := BIGINT) 6 examples

Daily river-discharge / flood forecast for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 30
past_days := BIGINT
Number of past days to include. · default 0
Returns columns
time TIMESTAMP WITH TIME ZONE
Start of the day this row aggregates (UTC).
date DATE
Provider's day label in the requested timezone (default auto). Uses the response's fixed UTC offset, ignoring DST changes within it.
river_discharge DOUBLE
Open-Meteo variable; API default unit.
Examples (6)

Daily river-discharge / flood forecast for a coordinate (Berlin).

SELECT date, river_discharge
FROM open_meteo.main.flood_daily(52.52, 13.41)
ORDER BY date;

Next 3 days.

SELECT date, river_discharge
FROM open_meteo.main.flood_daily(52.52, 13.41, forecast_days := 3)
ORDER BY date;

The past 7 days instead of the forecast window.

SELECT date, river_discharge
FROM open_meteo.main.flood_daily(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY date;
3 more examples

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.date, w.river_discharge
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.flood_daily(c.lat, c.lon) AS w;

Daily river-discharge / flood forecast for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.date, w.river_discharge
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.flood_daily(g.latitude, g.longitude) AS w
ORDER BY w.date;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.date, w.river_discharge
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.flood_daily(g.latitude, g.longitude) AS w;
Link
forecast_current (latitude DOUBLE, longitude DOUBLE, model := VARCHAR, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 6 examples

Current weather conditions for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
model := VARCHAR
One Open-Meteo model selector (default best_match). For example, gfs_global selects the GFS product. This records a requested selection, not the resolved source or model run of every variable. Comma-separated lists are not supported. · default "best_match"
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of the current conditions (UTC).
temperature_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
relative_humidity_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature DOUBLE
Open-Meteo variable; unit per *_unit args.
is_day BOOLEAN
Open-Meteo variable; unit per *_unit args.
precipitation DOUBLE
Open-Meteo variable; unit per *_unit args.
weather_code INTEGER
Open-Meteo variable; unit per *_unit args.
cloud_cover DOUBLE
Open-Meteo variable; unit per *_unit args.
pressure_msl DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_direction_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_gusts_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
interval_start TIMESTAMP WITH TIME ZONE
Start of the nominal aggregation window, for fields assigned it in open_meteo.temporal; instantaneous values use time.
interval_end TIMESTAMP WITH TIME ZONE
End of the nominal aggregation window (hourly/current windows end at time; daily start at time). Source-dependent fields have no common window.
interval_seconds INTEGER
Window length: 3600 hourly, 86400 per provider day, or the provider's current.interval (NULL if unknown). Not the native model resolution.
Examples (6)

Current weather conditions for a coordinate (Berlin).

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.forecast_current(52.52, 13.41);

Imperial units (°F, mph).

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.forecast_current(52.52, 13.41, temperature_unit := 'fahrenheit', wind_speed_unit := 'mph');

Select a model explicitly and inspect the response provenance. Retrieval time does not identify the forecast run.

SELECT time, temperature_2m, relative_humidity_2m, model_selection,
  grid_latitude, grid_longitude, retrieved_at
FROM open_meteo.main.forecast_current(52.52, 13.41, model := 'gfs_global');
3 more examples

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.forecast_current(c.lat, c.lon) AS w;

Current weather conditions for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.temperature_2m
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;
Link
forecast_daily (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, model := VARCHAR, past_days := BIGINT, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 10 examples

Daily weather forecast (up to 16 days) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 7
model := VARCHAR
One Open-Meteo model selector (default best_match). For example, gfs_global selects the GFS product. This records a requested selection, not the resolved source or model run of every variable. Comma-separated lists are not supported. · default "best_match"
past_days := BIGINT
Number of past days to include. · default 0
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "auto"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Start of the day this row aggregates (UTC).
date DATE
Provider's day label in the requested timezone (default auto). Uses the response's fixed UTC offset, ignoring DST changes within it.
weather_code INTEGER
Open-Meteo variable; unit per *_unit args.
temperature_2m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_min DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature_max DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature_min DOUBLE
Open-Meteo variable; unit per *_unit args.
sunrise TIMESTAMP WITH TIME ZONE
Open-Meteo variable; unit per *_unit args.
sunset TIMESTAMP WITH TIME ZONE
Open-Meteo variable; unit per *_unit args.
precipitation_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
rain_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
snowfall_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation_hours DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_gusts_10m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_direction_10m_dominant DOUBLE
Open-Meteo variable; unit per *_unit args.
shortwave_radiation_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
interval_start TIMESTAMP WITH TIME ZONE
Start of the nominal aggregation window, for fields assigned it in open_meteo.temporal; instantaneous values use time.
interval_end TIMESTAMP WITH TIME ZONE
End of the nominal aggregation window (hourly/current windows end at time; daily start at time). Source-dependent fields have no common window.
interval_seconds INTEGER
Window length: 3600 hourly, 86400 per provider day, or the provider's current.interval (NULL if unknown). Not the native model resolution.
Examples (10)

Daily weather forecast (up to 16 days) for a coordinate (Berlin).

SELECT date, weather_code, temperature_2m_max
FROM open_meteo.main.forecast_daily(52.52, 13.41)
ORDER BY date;

This week against the same week last year: Berlin's daily forecast high joined to the reanalysis high for the same calendar date one year earlier (the archive window is computed from today, so the query never needs editing).

SELECT f.date, f.temperature_2m_max AS forecast_high,
  h.temperature_2m_max AS last_year_high,
  round(f.temperature_2m_max - h.temperature_2m_max, 1) AS warmer_by
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 7) AS f
JOIN open_meteo.main.historical_daily(52.52, 13.41, strftime(current_date - INTERVAL 1 YEAR - INTERVAL 1 DAY, '%Y-%m-%d'), strftime(current_date - INTERVAL 1 YEAR + INTERVAL 8 DAY, '%Y-%m-%d')) AS h ON h.date = CAST(f.date - INTERVAL 1 YEAR AS DATE)
ORDER BY f.date;

Next 3 days, daily buckets in the location's local time zone.

SELECT date, weather_code, temperature_2m_max
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY date;
7 more examples

The past 7 days instead of the forecast window.

SELECT date, weather_code, temperature_2m_max
FROM open_meteo.main.forecast_daily(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY date;

Imperial units (°F, mph).

SELECT date, weather_code, temperature_2m_max
FROM open_meteo.main.forecast_daily(52.52, 13.41, temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY date;

Select a model explicitly and inspect the response provenance. Retrieval time does not identify the forecast run.

SELECT date, weather_code, temperature_2m_max, model_selection,
  grid_latitude, grid_longitude, retrieved_at
FROM open_meteo.main.forecast_daily(52.52, 13.41, model := 'gfs_global')
ORDER BY date;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.date, w.weather_code
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.forecast_daily(c.lat, c.lon) AS w;

Daily weather forecast (up to 16 days) for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.date, w.weather_code
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.forecast_daily(g.latitude, g.longitude) AS w
ORDER BY w.date;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.date, w.weather_code
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_daily(g.latitude, g.longitude) AS w;

Several places, each bucketed in its own local day: 'auto' resolves the zone from each row's coordinates.

SELECT p.city, w.date, w.weather_code
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_daily(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.date;
Link
forecast_hourly (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, model := VARCHAR, past_days := BIGINT, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 9 examples

Hourly weather forecast (up to 16 days) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 7
model := VARCHAR
One Open-Meteo model selector (default best_match). For example, gfs_global selects the GFS product. This records a requested selection, not the resolved source or model run of every variable. Comma-separated lists are not supported. · default "best_match"
past_days := BIGINT
Number of past days to include. · default 0
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of this hourly step (UTC).
temperature_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
relative_humidity_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
dew_point_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation_probability DOUBLE
Open-Meteo variable; unit per *_unit args.
rain DOUBLE
Open-Meteo variable; unit per *_unit args.
snowfall DOUBLE
Open-Meteo variable; unit per *_unit args.
weather_code INTEGER
Open-Meteo variable; unit per *_unit args.
pressure_msl DOUBLE
Open-Meteo variable; unit per *_unit args.
cloud_cover DOUBLE
Open-Meteo variable; unit per *_unit args.
visibility DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_direction_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_gusts_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
uv_index DOUBLE
Open-Meteo variable; unit per *_unit args.
is_day BOOLEAN
Open-Meteo variable; unit per *_unit args.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
interval_start TIMESTAMP WITH TIME ZONE
Start of the nominal aggregation window, for fields assigned it in open_meteo.temporal; instantaneous values use time.
interval_end TIMESTAMP WITH TIME ZONE
End of the nominal aggregation window (hourly/current windows end at time; daily start at time). Source-dependent fields have no common window.
interval_seconds INTEGER
Window length: 3600 hourly, 86400 per provider day, or the provider's current.interval (NULL if unknown). Not the native model resolution.
Examples (9)

Hourly weather forecast (up to 16 days) for a coordinate (Berlin).

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.forecast_hourly(52.52, 13.41)
ORDER BY time;

Next 3 days, daily buckets in the location's local time zone.

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.forecast_hourly(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY time;

The past 7 days instead of the forecast window.

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.forecast_hourly(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY time;
6 more examples

Imperial units (°F, mph).

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.forecast_hourly(52.52, 13.41, temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY time;

Select a model explicitly and inspect the response provenance. Retrieval time does not identify the forecast run.

SELECT time, temperature_2m, relative_humidity_2m, model_selection,
  grid_latitude, grid_longitude, retrieved_at
FROM open_meteo.main.forecast_hourly(52.52, 13.41, model := 'gfs_global')
ORDER BY time;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.forecast_hourly(c.lat, c.lon) AS w;

Hourly weather forecast (up to 16 days) for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.temperature_2m
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.forecast_hourly(g.latitude, g.longitude) AS w
ORDER BY w.time;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_hourly(g.latitude, g.longitude) AS w;

Several places, each window starting at its own local midnight: 'auto' resolves the zone per row.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_hourly(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.time;
Link
geocoding (name VARCHAR, count := BIGINT, country_code := VARCHAR, language := VARCHAR) 6 examples

Search places by name and return their coordinates (Open-Meteo geocoding).

Positional arguments
name VARCHAR
Place name to search for (>= 2 characters).
Named arguments
count := BIGINT
Maximum number of results (1-100). · default 10
country_code := VARCHAR
ISO-3166-1 alpha2 filter (empty = any country). · default ""
language := VARCHAR
Result language (e.g. en, de, fr). · default "en"
Returns columns
id BIGINT
GeoNames location id (stable join key).
name VARCHAR
Location name in the requested language.
latitude DOUBLE
Latitude in decimal degrees (WGS84).
longitude DOUBLE
Longitude in decimal degrees (WGS84).
elevation DOUBLE
Elevation in metres above sea level.
feature_code VARCHAR
GeoNames feature code (e.g. PPLC = capital city).
country_code VARCHAR
ISO-3166-1 alpha2 country code.
country VARCHAR
Country name.
admin1 VARCHAR
First-level administrative division (e.g. state).
admin2 VARCHAR
Second-level administrative division.
admin3 VARCHAR
Third-level administrative division.
admin4 VARCHAR
Fourth-level administrative division.
timezone VARCHAR
IANA timezone of the location.
population BIGINT
Population, if known.
postcodes VARCHAR[]
Associated postal codes; null if none.
Examples (6)

Find places named Berlin.

SELECT name, latitude, longitude, country
FROM open_meteo.main.geocoding('Berlin');

Up to 20 matches (coordinates feed the forecast_* functions).

SELECT name, latitude, longitude, country
FROM open_meteo.main.geocoding('Springfield', count := 20);

Localized search restricted to one country.

SELECT name, latitude, longitude
FROM open_meteo.main.geocoding('München', language := 'de', country_code := 'DE');
3 more examples

Resolve a whole column of place names in one correlated join.

SELECT p.city, g.name, g.latitude, g.longitude
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g;

The bridge itself: a place name straight through to current weather.

SELECT g.name, w.temperature_2m,
  open_meteo.main.weather_code_text(w.weather_code) AS conditions
FROM open_meteo.main.geocoding('Reykjavík', count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;

A column of place names joined through to current weather in one query.

SELECT p.city, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;
Link
historical_daily (latitude DOUBLE, longitude DOUBLE, start_date VARCHAR, end_date VARCHAR, model := VARCHAR, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 7 examples

Daily historical/reanalysis weather (1940→present) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
start_date VARCHAR
Start date, yyyy-mm-dd (inclusive).
end_date VARCHAR
End date, yyyy-mm-dd (inclusive).
Named arguments
model := VARCHAR
One Open-Meteo model selector (default best_match). Use era5 for a consistent historical reanalysis product. This records a requested selection, not the resolved source or model run of every variable. Comma-separated lists are not supported. · default "best_match"
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "auto"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Start of the day this row aggregates (UTC).
date DATE
Provider's day label in the requested timezone (default auto). Uses the response's fixed UTC offset, ignoring DST changes within it.
weather_code INTEGER
Open-Meteo variable; unit per *_unit args.
temperature_2m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_min DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature_max DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature_min DOUBLE
Open-Meteo variable; unit per *_unit args.
sunrise TIMESTAMP WITH TIME ZONE
Open-Meteo variable; unit per *_unit args.
sunset TIMESTAMP WITH TIME ZONE
Open-Meteo variable; unit per *_unit args.
precipitation_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
rain_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
snowfall_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation_hours DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_gusts_10m_max DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_direction_10m_dominant DOUBLE
Open-Meteo variable; unit per *_unit args.
shortwave_radiation_sum DOUBLE
Open-Meteo variable; unit per *_unit args.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
interval_start TIMESTAMP WITH TIME ZONE
Start of the nominal aggregation window, for fields assigned it in open_meteo.temporal; instantaneous values use time.
interval_end TIMESTAMP WITH TIME ZONE
End of the nominal aggregation window (hourly/current windows end at time; daily start at time). Source-dependent fields have no common window.
interval_seconds INTEGER
Window length: 3600 hourly, 86400 per provider day, or the provider's current.interval (NULL if unknown). Not the native model resolution.
Examples (7)

Daily historical/reanalysis weather (1940→present) for a coordinate over an explicit date range (Berlin).

SELECT date, weather_code, temperature_2m_max
FROM open_meteo.main.historical_daily(52.52, 13.41, '2024-06-01', '2024-06-07')
ORDER BY date;

Imperial units (°F, mph).

SELECT date, weather_code, temperature_2m_max
FROM open_meteo.main.historical_daily(52.52, 13.41, '2024-06-01', '2024-06-07', temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY date;

Select a model explicitly and inspect the response provenance. Retrieval time does not identify the forecast run.

SELECT date, weather_code, temperature_2m_max, model_selection,
  grid_latitude, grid_longitude, retrieved_at
FROM open_meteo.main.historical_daily(52.52, 13.41, '2024-06-01', '2024-06-07', model := 'era5')
ORDER BY date;
4 more examples

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.date, w.weather_code
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.historical_daily(c.lat, c.lon, '2024-06-01', '2024-06-07') AS w;

Daily historical/reanalysis weather (1940→present) for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.date, w.weather_code
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.historical_daily(g.latitude, g.longitude, '2024-06-01', '2024-06-07') AS w
ORDER BY w.date;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.date, w.weather_code
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.historical_daily(g.latitude, g.longitude, '2024-06-01', '2024-06-07') AS w;

Several places, each bucketed in its own local day: 'auto' resolves the zone from each row's coordinates.

SELECT p.city, w.date, w.weather_code
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.historical_daily(g.latitude, g.longitude, '2024-06-01', '2024-06-07', timezone := 'auto') AS w
ORDER BY p.city, w.date;
Link
historical_hourly (latitude DOUBLE, longitude DOUBLE, start_date VARCHAR, end_date VARCHAR, model := VARCHAR, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 7 examples

Hourly historical/reanalysis weather (1940→present) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
start_date VARCHAR
Start date, yyyy-mm-dd (inclusive).
end_date VARCHAR
End date, yyyy-mm-dd (inclusive).
Named arguments
model := VARCHAR
One Open-Meteo model selector (default best_match). Use era5 for a consistent historical reanalysis product. This records a requested selection, not the resolved source or model run of every variable. Comma-separated lists are not supported. · default "best_match"
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of this hourly step (UTC).
temperature_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
relative_humidity_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
dew_point_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
apparent_temperature DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation DOUBLE
Open-Meteo variable; unit per *_unit args.
rain DOUBLE
Open-Meteo variable; unit per *_unit args.
snowfall DOUBLE
Open-Meteo variable; unit per *_unit args.
weather_code INTEGER
Open-Meteo variable; unit per *_unit args.
pressure_msl DOUBLE
Open-Meteo variable; unit per *_unit args.
surface_pressure DOUBLE
Open-Meteo variable; unit per *_unit args.
cloud_cover DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_direction_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_gusts_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
shortwave_radiation DOUBLE
Open-Meteo variable; unit per *_unit args.
model_selection VARCHAR
Requested model, or provider_default where not selectable. best_match may blend models; even an explicit model may not source every derived field (e.g. precipitation probability).
source_endpoint VARCHAR
API product URL, without query or credentials (customer host for commercial requests).
retrieved_at TIMESTAMP WITH TIME ZONE
When the worker received the upstream response (kept on cache hits). Not a model run time, issue time or freshness guarantee.
grid_latitude DOUBLE
Provider's grid latitude; may differ from the requested point and not identify every grid in blended data.
grid_longitude DOUBLE
Provider's grid longitude; may differ from the requested point.
location_elevation DOUBLE
Provider's target elevation for grid selection and downscaling, if supplied; not necessarily the model-grid elevation.
response_timezone VARCHAR
Provider-resolved timezone. Timestamps stay UTC; the UTC offset labels provider daily intervals.
utc_offset_seconds INTEGER
Provider's fixed UTC offset for the response; not adjusted for DST changes within it.
interval_start TIMESTAMP WITH TIME ZONE
Start of the nominal aggregation window, for fields assigned it in open_meteo.temporal; instantaneous values use time.
interval_end TIMESTAMP WITH TIME ZONE
End of the nominal aggregation window (hourly/current windows end at time; daily start at time). Source-dependent fields have no common window.
interval_seconds INTEGER
Window length: 3600 hourly, 86400 per provider day, or the provider's current.interval (NULL if unknown). Not the native model resolution.
Examples (7)

Hourly historical/reanalysis weather (1940→present) for a coordinate over an explicit date range (Berlin).

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.historical_hourly(52.52, 13.41, '2024-06-01', '2024-06-07')
ORDER BY time;

Imperial units (°F, mph).

SELECT time, temperature_2m, relative_humidity_2m
FROM open_meteo.main.historical_hourly(52.52, 13.41, '2024-06-01', '2024-06-07', temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY time;

Select a model explicitly and inspect the response provenance. Retrieval time does not identify the forecast run.

SELECT time, temperature_2m, relative_humidity_2m, model_selection,
  grid_latitude, grid_longitude, retrieved_at
FROM open_meteo.main.historical_hourly(52.52, 13.41, '2024-06-01', '2024-06-07', model := 'era5')
ORDER BY time;
4 more examples

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.historical_hourly(c.lat, c.lon, '2024-06-01', '2024-06-07') AS w;

Hourly historical/reanalysis weather (1940→present) for a coordinate, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.temperature_2m
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.historical_hourly(g.latitude, g.longitude, '2024-06-01', '2024-06-07') AS w
ORDER BY w.time;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.historical_hourly(g.latitude, g.longitude, '2024-06-01', '2024-06-07') AS w;

Several places, each window starting at its own local midnight: 'auto' resolves the zone per row.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.historical_hourly(g.latitude, g.longitude, '2024-06-01', '2024-06-07', timezone := 'auto') AS w
ORDER BY p.city, w.time;
Link
marine_daily (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, past_days := BIGINT, timezone := VARCHAR) 7 examples

Daily marine forecast (wave/swell maxima) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 7
past_days := BIGINT
Number of past days to include. · default 0
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "auto"
Returns columns
time TIMESTAMP WITH TIME ZONE
Start of the day this row aggregates (UTC).
date DATE
Provider's day label in the requested timezone (default auto). Uses the response's fixed UTC offset, ignoring DST changes within it.
wave_height_max DOUBLE
Open-Meteo variable; API default unit.
wave_direction_dominant DOUBLE
Open-Meteo variable; API default unit.
wave_period_max DOUBLE
Open-Meteo variable; API default unit.
wind_wave_height_max DOUBLE
Open-Meteo variable; API default unit.
swell_wave_height_max DOUBLE
Open-Meteo variable; API default unit.
Examples (7)

Daily marine forecast (wave/swell maxima) for a coordinate (Berlin).

SELECT date, wave_height_max, wave_direction_dominant
FROM open_meteo.main.marine_daily(52.52, 13.41)
ORDER BY date;

Next 3 days, daily buckets in the location's local time zone.

SELECT date, wave_height_max, wave_direction_dominant
FROM open_meteo.main.marine_daily(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY date;

The past 7 days instead of the forecast window.

SELECT date, wave_height_max, wave_direction_dominant
FROM open_meteo.main.marine_daily(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY date;
4 more examples

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.date, w.wave_height_max
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.marine_daily(c.lat, c.lon) AS w;

Daily marine forecast (wave/swell maxima) for a coordinate, starting from the place name 'Scheveningen' instead of a coordinate.

SELECT g.name, w.date, w.wave_height_max
FROM open_meteo.main.geocoding('Scheveningen', count := 1) AS g,
     LATERAL open_meteo.main.marine_daily(g.latitude, g.longitude) AS w
ORDER BY w.date;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.date, w.wave_height_max
FROM (VALUES ('Scheveningen'), ('Brighton')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.marine_daily(g.latitude, g.longitude) AS w;

Several places, each bucketed in its own local day: 'auto' resolves the zone from each row's coordinates.

SELECT p.city, w.date, w.wave_height_max
FROM (VALUES ('Scheveningen'), ('Brighton')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.marine_daily(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.date;
Link
marine_hourly (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, past_days := BIGINT, timezone := VARCHAR) 8 examples

Hourly marine forecast (wave/swell) for a coordinate.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 7
past_days := BIGINT
Number of past days to include. · default 0
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of this hourly step (UTC).
wave_height DOUBLE
Open-Meteo variable; API default unit.
wave_direction DOUBLE
Open-Meteo variable; API default unit.
wave_period DOUBLE
Open-Meteo variable; API default unit.
wind_wave_height DOUBLE
Open-Meteo variable; API default unit.
wind_wave_direction DOUBLE
Open-Meteo variable; API default unit.
wind_wave_period DOUBLE
Open-Meteo variable; API default unit.
swell_wave_height DOUBLE
Open-Meteo variable; API default unit.
swell_wave_direction DOUBLE
Open-Meteo variable; API default unit.
swell_wave_period DOUBLE
Open-Meteo variable; API default unit.
Examples (8)

Hourly marine forecast (wave/swell) for a coordinate (Berlin).

SELECT time, wave_height, wave_direction
FROM open_meteo.main.marine_hourly(52.52, 13.41)
ORDER BY time;

Surf check for a beach named rather than located: geocode Scheveningen once, then line up its hourly wave height and period with the land forecast's wind speed and compass direction at the same point.

SELECT m.time, m.wave_height, m.wave_period, f.wind_speed_10m,
  open_meteo.main.wind_compass(f.wind_direction_10m) AS wind_from
FROM open_meteo.main.geocoding('Scheveningen', count := 1) AS g,
     LATERAL open_meteo.main.marine_hourly(g.latitude, g.longitude, forecast_days := 2) AS m
JOIN open_meteo.main.forecast_hourly(g.latitude, g.longitude, forecast_days := 2) AS f ON f.time = m.time
ORDER BY m.time;

Next 3 days, daily buckets in the location's local time zone.

SELECT time, wave_height, wave_direction
FROM open_meteo.main.marine_hourly(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY time;
5 more examples

The past 7 days instead of the forecast window.

SELECT time, wave_height, wave_direction
FROM open_meteo.main.marine_hourly(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY time;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.wave_height
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.marine_hourly(c.lat, c.lon) AS w;

Hourly marine forecast (wave/swell) for a coordinate, starting from the place name 'Scheveningen' instead of a coordinate.

SELECT g.name, w.time, w.wave_height
FROM open_meteo.main.geocoding('Scheveningen', count := 1) AS g,
     LATERAL open_meteo.main.marine_hourly(g.latitude, g.longitude) AS w
ORDER BY w.time;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.wave_height
FROM (VALUES ('Scheveningen'), ('Brighton')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.marine_hourly(g.latitude, g.longitude) AS w;

Several places, each window starting at its own local midnight: 'auto' resolves the zone per row.

SELECT p.city, w.time, w.wave_height
FROM (VALUES ('Scheveningen'), ('Brighton')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.marine_hourly(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.time;
Link
previous_runs_hourly (latitude DOUBLE, longitude DOUBLE, forecast_days := BIGINT, models := VARCHAR, past_days := BIGINT, precipitation_unit := VARCHAR, temperature_unit := VARCHAR, timezone := VARCHAR, wind_speed_unit := VARCHAR) 8 examples

Hourly forecasts from successive earlier model runs, for scoring forecast skill by lead time.

Positional arguments
latitude DOUBLE
Latitude in degrees north (WGS84).
longitude DOUBLE
Longitude in degrees east (WGS84).
Named arguments
forecast_days := BIGINT
Number of forecast days to return. · default 1
models := VARCHAR
Comma-separated model ids (empty = Open-Meteo default). · default ""
past_days := BIGINT
Number of past days to include. · default 0
precipitation_unit := VARCHAR
Precipitation unit for the response. · default "mm"
temperature_unit := VARCHAR
Temperature unit for the response. · default "celsius"
timezone := VARCHAR
IANA timezone or 'auto'. Daily intervals use the provider's fixed UTC offset for this zone; DST transitions within a response are not applied. Time columns are always emitted as UTC. 'auto' resolves from each row's own coordinates, so under a LATERAL join every location gets its local zone. Daily functions default to 'auto'; other functions default to GMT. The value must be a constant — a named argument cannot read a column. · default "GMT"
wind_speed_unit := VARCHAR
Wind-speed unit for the response. · default "kmh"
Returns columns
time TIMESTAMP WITH TIME ZONE
Timestamp of this hourly step (UTC).
temperature_2m DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day1 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day2 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day3 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day4 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day5 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day6 DOUBLE
Open-Meteo variable; unit per *_unit args.
temperature_2m_previous_day7 DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation_previous_day1 DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation_previous_day2 DOUBLE
Open-Meteo variable; unit per *_unit args.
precipitation_previous_day3 DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m_previous_day1 DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m_previous_day2 DOUBLE
Open-Meteo variable; unit per *_unit args.
wind_speed_10m_previous_day3 DOUBLE
Open-Meteo variable; unit per *_unit args.
Examples (8)

Hourly forecasts from successive earlier model runs, for scoring forecast skill by lead time (Berlin).

SELECT time, temperature_2m, temperature_2m_previous_day1
FROM open_meteo.main.previous_runs_hourly(52.52, 13.41)
ORDER BY time;

Next 3 days, daily buckets in the location's local time zone.

SELECT time, temperature_2m, temperature_2m_previous_day1
FROM open_meteo.main.previous_runs_hourly(52.52, 13.41, forecast_days := 3, timezone := 'auto')
ORDER BY time;

The past 7 days instead of the forecast window.

SELECT time, temperature_2m, temperature_2m_previous_day1
FROM open_meteo.main.previous_runs_hourly(52.52, 13.41, past_days := 7, forecast_days := 0)
ORDER BY time;
5 more examples

Imperial units (°F, mph).

SELECT time, temperature_2m, temperature_2m_previous_day1
FROM open_meteo.main.previous_runs_hourly(52.52, 13.41, temperature_unit := 'fahrenheit', wind_speed_unit := 'mph')
ORDER BY time;

Many locations in one query — coordinates supplied by a column.

SELECT c.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin', 52.52, 13.41), ('Tokyo', 35.69, 139.69)) AS c(city, lat, lon),
     LATERAL open_meteo.main.previous_runs_hourly(c.lat, c.lon) AS w;

Hourly forecasts from successive earlier model runs, for scoring forecast skill by lead time, starting from the place name 'Berlin' instead of a coordinate.

SELECT g.name, w.time, w.temperature_2m
FROM open_meteo.main.geocoding('Berlin', count := 1) AS g,
     LATERAL open_meteo.main.previous_runs_hourly(g.latitude, g.longitude) AS w
ORDER BY w.time;

A column of place names geocoded and queried in one pass.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.previous_runs_hourly(g.latitude, g.longitude) AS w;

Several places, each window starting at its own local midnight: 'auto' resolves the zone per row.

SELECT p.city, w.time, w.temperature_2m
FROM (VALUES ('Berlin'), ('Tokyo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.previous_runs_hourly(g.latitude, g.longitude, timezone := 'auto') AS w
ORDER BY p.city, w.time;
Link
Scalar macros
european_aqi_category (aqi ANY) 2 examples

Bucket a European AQI value into its CAMS band (e.g. 75 → 'Poor').

Arguments
aqi ANY
European Air Quality Index value from an air_quality function (european_aqi column).
Examples (2)

European AQI band for current conditions in Berlin.

SELECT european_aqi,
  open_meteo.main.european_aqi_category(european_aqi) AS band
FROM open_meteo.main.air_quality_current(52.52, 13.41);

Rank named European cities by their current AQI band.

SELECT p.city, a.european_aqi,
  open_meteo.main.european_aqi_category(a.european_aqi) AS band
FROM (VALUES ('Berlin'), ('Milan'), ('Warsaw')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.air_quality_current(g.latitude, g.longitude) AS a
ORDER BY a.european_aqi DESC;
Link
us_aqi_category (aqi ANY) 2 examples

Bucket a US AQI value into its EPA category (e.g. 120 → 'Unhealthy for Sensitive Groups').

Arguments
aqi ANY
US Air Quality Index value from an air_quality function (us_aqi column).
Examples (2)

US AQI category for current conditions in Los Angeles.

SELECT us_aqi, open_meteo.main.us_aqi_category(us_aqi) AS category
FROM open_meteo.main.air_quality_current(34.05, -118.24);

Same city by name — geocode, then band the AQI.

SELECT g.name, a.us_aqi,
  open_meteo.main.us_aqi_category(a.us_aqi) AS category
FROM open_meteo.main.geocoding('Los Angeles', count := 1) AS g,
     LATERAL open_meteo.main.air_quality_current(g.latitude, g.longitude) AS a;
Link
uv_index_category (uv ANY) 2 examples

Bucket a UV index into its WHO exposure category (e.g. 9 → 'Very High').

Arguments
uv ANY
UV index value from a forecast or air_quality function (uv_index column).
Examples (2)

UV-index risk category over the next day of hourly forecast.

SELECT time, uv_index, open_meteo.main.uv_index_category(uv_index) AS risk
FROM open_meteo.main.forecast_hourly(52.52, 13.41, forecast_days := 1)
ORDER BY time;

Peak UV risk tomorrow for a place named rather than located.

SELECT w.time, w.uv_index,
  open_meteo.main.uv_index_category(w.uv_index) AS risk
FROM open_meteo.main.geocoding('Nairobi', count := 1) AS g,
     LATERAL open_meteo.main.forecast_hourly(g.latitude, g.longitude, forecast_days := 1) AS w
ORDER BY w.uv_index DESC
LIMIT 5;
Link
weather_code_emoji (code ANY) 2 examples

Map a WMO weather_code to a representative weather emoji (e.g. 95 → ⛈️).

Arguments
code ANY
WMO weather-interpretation code from a forecast/historical function.
Examples (2)

Weather emoji for the current conditions.

SELECT weather_code,
  open_meteo.main.weather_code_emoji(weather_code) AS icon
FROM open_meteo.main.forecast_current(52.52, 13.41);

A dashboard row per named city, geocoded in the same query.

SELECT p.city, w.temperature_2m,
  open_meteo.main.weather_code_emoji(w.weather_code) AS icon
FROM (VALUES ('Berlin'), ('Tokyo'), ('Cairo')) AS p(city),
     LATERAL open_meteo.main.geocoding(p.city, count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;
Link
weather_code_text (code ANY) 2 examples

Translate a WMO weather_code into an English description (e.g. 61 → 'Slight rain').

Arguments
code ANY
WMO weather-interpretation code from a forecast/historical function.
Examples (2)

Decode the current weather code to text.

SELECT weather_code,
  open_meteo.main.weather_code_text(weather_code) AS conditions
FROM open_meteo.main.forecast_current(52.52, 13.41);

Same, starting from a place name: geocode, then decode.

SELECT g.name,
  open_meteo.main.weather_code_text(w.weather_code) AS conditions
FROM open_meteo.main.geocoding('Lisbon', count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;
Link
wind_compass (degrees ANY) 2 examples

Convert a bearing in degrees to a 16-point compass abbreviation (e.g. 315 → 'NW').

Arguments
degrees ANY
Wind (or wave) bearing the flow comes from, in meteorological degrees.
Examples (2)

Current wind direction as a compass point.

SELECT wind_direction_10m,
  open_meteo.main.wind_compass(wind_direction_10m) AS from_dir
FROM open_meteo.main.forecast_current(52.52, 13.41);

Wind direction for a place looked up by name.

SELECT g.name, w.wind_speed_10m,
  open_meteo.main.wind_compass(w.wind_direction_10m) AS from_dir
FROM open_meteo.main.geocoding('Wellington', count := 1) AS g,
     LATERAL open_meteo.main.forecast_current(g.latitude, g.longitude) AS w;
Link

Try these queries

elevation_echoes_coordinate — elevation() echoes the requested coordinate and adds terrain height.

SELECT latitude, longitude FROM open_meteo.main.elevation(52.52, 13.41);

Uses elevation

geocoding_resolves_place_name — geocoding() turns a place name into the coordinate the weather functions want — the starting point for anyone who has a city rather than a latitude.

SELECT name, country_code
FROM open_meteo.main.geocoding('Tokyo', count := 1);

Uses geocoding

Current conditions in Berlin, weather code decoded to text.

SELECT temperature_2m,
  open_meteo.main.weather_code_text(weather_code) AS conditions
FROM open_meteo.main.forecast_current(52.52, 13.41)

Uses weather_code_textforecast_current

Planning an outdoor run: the dry hours of Berlin's next two days, cleanest air first — the hourly weather forecast joined to the air-quality forecast on the same UTC hour, with the European AQI decoded to its band.

SELECT w.time, w.temperature_2m, a.european_aqi,
  open_meteo.main.european_aqi_category(a.european_aqi) AS air_quality
FROM open_meteo.main.forecast_hourly(52.52, 13.41, forecast_days := 2) AS w
JOIN open_meteo.main.air_quality_hourly(52.52, 13.41, forecast_days := 2) AS a ON a.time = w.time
WHERE w.precipitation = 0
ORDER BY a.european_aqi, w.time
LIMIT 10

Uses european_aqi_categoryforecast_hourlyair_quality_hourly

Surf check for a beach named rather than located: geocode Scheveningen once, then line up its hourly wave height and period with the land forecast's wind speed and compass direction at the same point.

SELECT m.time, m.wave_height, m.wave_period, f.wind_speed_10m,
  open_meteo.main.wind_compass(f.wind_direction_10m) AS wind_from
FROM open_meteo.main.geocoding('Scheveningen', count := 1) AS g,
     LATERAL open_meteo.main.marine_hourly(g.latitude, g.longitude, forecast_days := 2) AS m
JOIN open_meteo.main.forecast_hourly(g.latitude, g.longitude, forecast_days := 2) AS f ON f.time = m.time
ORDER BY m.time

Uses wind_compassgeocodingmarine_hourlyforecast_hourly

How sure is the forecast? Berlin's best-match daily high for the next 5 local days next to the lowest and highest of the GFS ensemble members — days where the forecast high falls outside that range disagree with the whole ensemble.

SELECT f.date, f.temperature_2m_max AS forecast_high,
  list_min(list_value(*COLUMNS('temperature_2m_max_member\d+'))) AS members_low,
  list_max(list_value(*COLUMNS('temperature_2m_max_member\d+'))) AS members_high
FROM open_meteo.main.forecast_daily(52.52, 13.41, forecast_days := 5, timezone := 'auto') AS f
JOIN open_meteo.main.ensemble_daily(52.52, 13.41, forecast_days := 5, timezone := 'auto') AS e ON e.date = f.date
ORDER BY f.date

Uses forecast_dailyensemble_daily

131 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • Describe the current weather in Berlin: temperature, a text summary, an emoji, and the wind direction as a compass point.
  • Find the coordinates of Tokyo and return its daily high and low temperature for the next 3 days.
  • For the next day in Berlin, list the hourly UV index and its WHO risk category.
  • What is the terrain elevation, in metres, at latitude 27.99 and longitude 86.93?
  • Get Berlin's daily maximum temperature for the first week of June 2024, and the hourly temperature for June 1st.
  • What is the current US AQI in Los Angeles and its EPA health category?

Open-Meteo is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.