Skip to main content

Add Station

Add a new weather station to the directory. The command creates a new JSON file in the stations directory of your local repository and assigns a unique Meteostat ID automatically.

Usage​

meteo station add [OPTIONS]

When called without options, the command runs interactively and prompts for all required properties. Any property passed as an option is not prompted for.

Examples​

meteo station add                                   # Interactive mode
meteo station add \
--name "Frankfurt Airport" \
--country DE \
--region HE \
--lat 50.05 --lon 8.6 --elevation 111 \
--timezone Europe/Berlin \
--id wmo=10637 --id icao=EDDF # Non-interactive
meteo station add --name de="Frankfurt Flughafen" \
--name en="Frankfurt Airport" ... # Multiple languages

Identifiers are passed as KEY=VALUE pairs and stored in the station's identifiers object. Any key is accepted, so you can add identifiers for national networks or other data sources in addition to common ones like wmo, icao, iata, national and ghcn.

Before the file is written, the new station is validated and checked against existing stations for potential duplicates. If a likely duplicate is found, you are asked to confirm.

On success, the command prints the ID and path of the new station file:

Created station 0A1B2 (stations/0A1B2.json)

Options​

OptionShortDescription
--name-nStation name. Use LANG=NAME to set a localized name (repeatable). A plain value is stored as English (en)
--country-cISO 3166-1 alpha-2 country code
--regionISO 3166-2 state or region code
--latLatitude in decimal degrees
--lonLongitude in decimal degrees
--elevation-eElevation in meters
--timezone-tIANA time zone (e.g. Europe/Berlin)
--id-iStation identifier as KEY=VALUE (e.g. wmo=10637, icao=EDDF). Any key is accepted (repeatable)
--yes-yDon't prompt; fail if a required property is missing and skip duplicate confirmation
--dry-runPrint the resulting JSON without writing any file
--repoPath to the stations repository (overrides stations_repo)