weather(1) | General Commands Manual | weather(1) |
weather - command-line tool to obtain weather conditions and forecasts
weather [ options ] [ alias1 | search1 [ alias2 | search2 [...]]]
This command-line utility is intended to provide quick access to current weather conditions and forecasts. Presently, it is capable of returning data for localities throughout the USA and some select locations globally by retrieving and formatting decoded METARs (Meteorological Aerodrome Reports) from NOAA (the USA National Oceanic and Atmospheric Administration) and forecasts/alerts from NWS (the USA National Weather Service). The tool is written to function in the same spirit as other command-line informational utilities like cal(1), calendar(1) and dict(1). It retrieves arbitrary weather data via precompiled correlations or custom-tailored aliases (system-wide or on a per-user basis).
Behavior can be determined by command-line options and specification of zero or more location aliases and search terms.
Aliases are defined in weatherrc(5) files, as a convenient means of grouping URIs together using a short name. Specifying multiple aliases or location search terms on the command line causes the utility to output data for each, as if it had been invoked multiple times. If none are specified, then an alias of default is checked for a defargs option and any alias names listed within it (comma-separated) are applied instead.
Searches utilize location correlation sets in INI-style text files named airports, places, stations, zctas and zones. A precomputed copy is distributed with the source, but can be rebuilt from updated data sources as needed by placing them in the current working directory and running with the --build-sets option (see the comments at the top of any location correlation set file for instructions on where to find updated data sources). Positive search results are cached and sourced as aliases on subsequent runs for as long as the correlation sets remain unchanged, and are cleared automatically once the correlation sets are updated.
Retrieved data is also cached automatically for a short period of time, adjustable with the cacheage configuration option or --cacheage command-line option. This helps throttle load against NOAA/NWS servers in case the utility is repeatedly re-run requesting the same data, but can be overridden with the cache_data configuration option or --no-cache-data command-line option.
A summary of options is included below.
weather may additionally obtain configuration data from a system-wide configuration file, a per-user configuration file, and a local directory configuration file. The file format and configuration options are described in weatherrc(5). They are aggregated in the following order:
Utility and manual written by Jeremy Stanley <fungi@yuggoth.org>.
2016-11-08 | 2.3 |