1 .TH weather 1 "2020\-08\-23" "2.4.1" \" -*- nroff -*-
2 \" Copyright (c) 2006-2020 Jeremy Stanley <fungi@yuggoth.org>.
3 \" Permission to use, copy, modify, and distribute this software is
4 \" granted under terms provided in the LICENSE file distributed with
7 weather \- command-line tool to obtain weather conditions and forecasts
23 This command-line utility is intended to provide quick access to current
24 weather conditions and forecasts.
26 Presently, it is capable of returning data for localities throughout the
27 USA and some select locations globally by retrieving and formatting
28 decoded METARs (Meteorological Aerodrome Reports) from NOAA (the USA
29 National Oceanic and Atmospheric Administration) and forecasts/alerts
30 from NWS (the USA National Weather Service).
32 The tool is written to function in the same spirit as other command-line
33 informational utilities like \fIcal\fR(1), \fIcalendar\fR(1) and
36 It retrieves arbitrary weather data via precompiled correlations or
37 custom-tailored aliases (system-wide or on a per-user basis).
39 Behavior can be determined by command-line options and specification of
40 zero or more location aliases and search terms.
42 Aliases are defined in \fIweatherrc\fR(5) files, as a convenient means
43 of grouping URIs together using a short name.
45 Specifying multiple aliases or location search terms on the command line
46 causes the utility to output data for each, as if it had been invoked
49 If none are specified, then an alias of \fIdefault\fR is checked for a
50 \fIdefargs\fR option and any alias names listed within it
51 (comma-separated) are applied instead.
53 Searches utilize location correlation sets in INI-style text files named
54 \fIairports\fR, \fIplaces\fR, \fIstations\fR, \fIzctas\fR and
57 A precomputed copy is distributed with the source, but can be rebuilt
58 from updated data sources as needed by placing them in the current
59 working directory and running with the \fI\-\-build\-sets\fR option (see
60 the comments at the top of any location correlation set file for
61 instructions on where to find updated data sources).
63 Positive search results are cached and sourced as aliases on subsequent
64 runs for as long as the correlation sets remain unchanged, and are
65 cleared automatically once the correlation sets are updated.
67 Retrieved data is also cached automatically for a short period of time,
68 adjustable with the \fIcacheage\fR configuration option or
69 \fI\-\-cacheage\fR command-line option.
71 This helps throttle load against NOAA/NWS servers in case the utility is
72 repeatedly re-run requesting the same data, but can be overridden with
73 the \fIcache_data\fR configuration option or \fI\-\-no\-cache\-data\fR
77 A summary of options is included below.
80 show program's version number and exit
83 show a help message and exit
85 .BR \-a ", " \-\-alert
86 include local alert notices
88 .BR \-\-atypes =\fIATYPES\fR
89 list of alert notification types to display (ex:
90 .BR tornado_warning,urgent_weather_message )
93 (re)build location correlation sets
95 .BR \-\-cacheage =\fICACHEAGE\fR
96 duration in seconds to refresh cached data (ex:
99 .BR \-\-cachedir =\fICACHEDIR\fR
100 directory for storing cached searches and data (ex:
103 .BR \-f ", " \-\-forecast
104 include a local forecast
106 .BR \-\-headers =\fIHEADERS\fR
107 list of conditions headers to display (ex:
108 .BR temperature,wind )
111 filter/convert conditions for US/UK units
114 output detailed information for your search
116 .BR \-l ", " \-\-list
117 list all configured aliases and cached searches
120 display details of all configured aliases
122 .BR \-m ", " \-\-metric
123 filter/convert conditions for metric units
125 .BR \-n ", " \-\-no\-conditions
126 disable output of current conditions
129 disable all caching (searches and data)
131 .BR \-\-no\-cache\-data
132 disable retrieved data caching
134 .BR \-\-no\-cache\-search
135 disable search result caching
137 .BR \-q ", " \-\-quiet
138 skip preambles and don't indent
140 .BR \-\-setpath =\fISETPATH\fR
141 directory search path for correlation sets (ex:
144 .BR \-v ", " \-\-verbose
145 show full decoded feeds
149 View output for the default alias, if one has been defined (otherwise
150 display usage/syntax similar to \-\-help)
153 Display weather conditions at the airport with IATA/FAA code \fIRDU\fR.
155 .BR weather " " \-\-info " " raleigh
156 Show a list of FIPS codes for United States Census Bureau places
157 containing the word \fIraleigh\fR (or the proximity information if only
158 one match was found).
160 .BR weather " " \(dq ^ral[ie]{2}gh " " city.*nc$ \(dq
161 Get the current weather conditions from the nearest station to the
162 Census place name matching the regular expression provided.
164 .BR weather " " \-fv " " fips3755000
165 Get the full decoded METAR from the nearest station, and the forecast
166 data for the nearest zone to the Census place with FIPS code
167 \fI3755000\fR with no special filtering or formatting.
169 .BR weather " " \-\-forecast " " \-\-no\-cache\-data " " 27613
170 Ignore any recent cached METAR or forecast data and display fresh output
171 for the nearest station and zone to the Census ZCTA (essentially USPS
172 ZIP code) \fI27613\fR.
174 .BR weather " " home " " work
175 Show current conditions for both the \fIhome\fR and \fIwork\fR aliases
178 .BR weather " " 35.878573,\-78.727813
180 .BR weather " " 35\-52\-43n,78\-43\-40w
182 .BR weather " " \(dq 35\-52n, " " 78\-43w \(dq
183 Display weather conditions for the nearest station to an arbitrary set
184 of global coordinates in latitude,longitude order either in decimal
185 format or degree, degree\-minute or degree\-minute\-second formats,
186 optionally using signed or cardinal hemisphere designations with or
189 Note that the cut-off for maximum acceptable distance is hard-coded at
190 0.1 radians (roughly 637km or 396mi).
195 may additionally obtain configuration data from a system-wide
196 configuration file, a per-user configuration file, and a local
197 directory configuration file.
199 The file format and configuration options are described in
202 They are aggregated in the following order:
204 .I /etc/weatherrc " or " /etc/weather/weatherrc
205 the system-wide configuration
207 .IR ~/.weather/weatherrc " or " ~/.weatherrc
208 the per-user configuration
211 the local directory configuration
213 Utility and manual written by Jeremy Stanley <fungi@yuggoth.org>.