get_ogd_history
Retrieve historical MeteoSwiss OGD measurements for one station and date range, choosing daily or hourly data and limiting rows for focused analysis.
Instructions
Get historical MeteoSwiss OGD measurements for one station and date range by parsing the STAC CSV assets. Daily data defaults to the smaller recent/historical files. Hourly history is limited to 14 days because decade files are large. Times are Swiss local time (no offset).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows (default 31, max 100). When truncated, the latest rows in the range are kept. | |
| station | Yes | Station abbreviation (e.g. BER). | |
| end_date | Yes | Last day YYYY-MM-DD (inclusive). | |
| collection | No | OGD collection alias (default smn). Aliases: smn, smn-precip, smn-tower, nime, nbcn, nbcn-precip, obs, phenology, tot. A full STAC id such as ch.meteoschweiz.ogd-smn is also accepted. | |
| parameters | No | Comma-separated parameter codes, or omit for the common meteorological columns. | |
| start_date | Yes | First day YYYY-MM-DD (inclusive). | |
| granularity | No | Resolution: t, h, d (daily, default), m, or y. |