HOME | DD

#bash #linux #meteorology #weather #shellscript #i18n
Published: 2015-12-23 20:21:52 +0000 UTC; Views: 2425; Favourites: 3; Downloads: 10
Redirect to original
Description
Screen #3 The mws-y.sh script is the most complex one of the collection. Localized in Korean, it reveals detailed weather info items by hovering the dzen title bar. And besides it’s for a single place only (i.e. the city of Busan, ROK), this script makes use of a couple of different weather services. Clicking on a button then triggers another dzen instance (mws-ycam.sh), displaying webcam thumbnails. The bars (5) and (6) show different layouts.mws-y.sh refers to Norway’s public weather service Yr , of which the script takes great advantage of detailed data and a huge icon set – so praise to all Norwegian tax payers! – Anyway, some graphics aren’t provided for download and hence must be downloaded and converted on the fly. And here’s a disadvantage of dzen supporting XBM/XPM icon format only: The small color palette can make the icons look jagged due to aliasing. One just can try to soften this effect by adding blur, or resizing; no trivial task!
Contents
screen #1 & 1. Specs · 2. What’s this all about …
screen #2 & 3. Troubleshooting
screen #3 & .: 4. Links and References:.
4. Links and References
4.1 Deviation related
- “mws” branch of my github repo, including a basic set of icons: [link]
- original icon set by OWM Inc.: [link1] , under Creative Commons Public License CC BY-SA, [link2]
- openweathermap.org (OWM) weather service (UK/US based, international mirrors)
- Internet Weather Source by NOAA/National Weather Service (US based): [link]
- yr.no (Yr), Norwegian Meteorological Institute and Norwegian Broadcasting Corporation: [link] (NO/EN)
- the GNU Bourne Again Shell (or simply Bash), project homepage: [link] – Be sure to install the lastest package of your Linux distro anyway.
- The Arch wiki comes with some more interesting links: [link] . – For those interested, a couple of on-line Bash scripting resources in the following:
- The Linux Documentation Project: Advanced Bash-Scripting Guide, [link]
- bash-hackers.org wiki, [link]
- Ubuntu’s German Bash scripting guide for beginners, [link] (DE)
- free article on Bash variables in J. Wolf, Shell-Programmierung (Germany 2005), [link] (DE)
- dzen2 multi-purpose notification app, homepage: [link]
- homepage of tiling WM XMonad, the main field application of dzen: [link]
- internet console apps: [link]
- introducing the versatile downloader wget: [link]
- sed is a string manipulation utility, a script writer should know about: [link] – Similar tools like (g)awk, tr, or the calculator bc come either as seperate or bundled packages. Have a look at the GNU Coreutils anyway, [link] .
- The popular NoScript JavaScript blocker for Mozilla browsers like Firefox is found here: [link1] , and ScriptBlock (successor of notscripts) for Chromium/Chrome there: [link2] .
- Conversion between Celsius and Fahrenheit values on the command line is easy with gotemps: [link] . – Or you might already have units installed: [link] .
- ImageMagick is the helper of my choice when it comes to batch-processing graphics as well as (partially) font issues,
- Ethan Schoonover’s Solarized color project: [link]
[ ^ ] [ Contents ]
4.2 Further readings and resources
By all means the following lists are also exemplified and meant to be of some use for self-teaching purposes.
4.2.1 Linux weather apps
There’re countless free as well as commercial GNU/Linux or cross-platform programs from simple weather monitoring and forecasts over scientific re-processing, up to feeding networks with data from private weather stations:
- Query at the Free Software Foundation (FSF) database: [link]
- Arch Linux official and user provided packages: [link1] [link2]
- Talking of desktop widgets, conky is the most popular app. Find its weather fun stuff with all its bling on dA here: [link]
- Lovers of minimal-retro styles may look for weatherspect, which goes into animated ASCII art: [link1] . It’s really nice terminal fun, and soon I’m going to submit a screenshot of it myself for sure; nonetheless I wonder why sun and moon always move from right to left only, as I’m living on the Northern hemisphere. – A companion would be phoon for displaying the moon phases: [link2]
- The Haskell written app xmobar is the other widely used status bar used along with (but not limited to) XMonad. It’s for text output, and that’s why it needs much more space e. g. for weather conditions; see this former screenie of mine, on the upper right: [link1] Besides, it retrieves meteorological data from the above mentioned NWS: [link2]
- It appears that OMW is Linux friendly when it comes to getting connected to own weather stations: [link]
[ ^ ] [ Contents ]
4.2.2 Windows and cross-platform apps
If on the other side you’re on for graphically displaying weather info on your desktop now but sadly enough also a Windows user, alas, you’re left with a couple of native or cross-platform and skinnable alternatives, too, as part of general system monitoring suites. These selective popular ones seem to be for free for private use, or at least are shareware (anyway you’ll be leaving traces and paying with your data on the net). – Note, when using such skins as weather icon resources, mind the licenses and don’t forget crediting!
- Rainlendar on Wikipedia: [link]
- homepage of Rainmeter: [link]
- Samurize: [link]
- weather related deviations, [link]
- Sysmetrix: [link]
- weather related deviations, [link]
- CWOP, Weather Software Supporting CWOP/APRSWXNET Protocol: [link]
[ ^ ] [ Contents ]
4.2.3 Meteorology info and education resources
- General introduction and terminology:
- U.S. National Oceanic and Atmospheric Administration (NOAA):
- American Meteorological Society, Glossary of Meteorology, [link]
- Deutscher Wetterdienst, Wetterlexikon, [link] (DE)
- Central Weather Bureau, Taipei (Taiwan), Meteorology Encyclopedia, [link1] (EN) [link2] (ZH)
- Wikipedia, section on METAR, [link]
- College of DuPage, METAR help, [link]
- NOAA, Key to METAR Surface Weather Observations, [link]
- METAR/TAF List of Abbreviations and Acronyms, [link] (PDF)
[ ^ ] [ Contents ]
4.2.4 Finding your weather service
Since for this project we just want to visit websites from time to time, it’s not necessary to join any organization, user group etc. And hopefully for basic weather parsing there’s no need to struggle with add cluttered commercial sites.
- National weather offices
– Governmental weather services are primilarly focused on, but not limited to their national citizens. Usually they’ve also got global data, at least for major destinations. There’re often international cooperations. National agencies are parts of scientific networks and serve private, commercial or public customers, such as media companies. The national services provide weather data in many different ways.- There isn’t hardly a country not being a member of the World Meteorological Organization (WMO), [link]
- Wikipedia, List of weather services, [link]
- U.S. National Weather Service by NOAA, start [here] (text only) or [there] (with icons) – NWS Dissemination Services, [link]
The NWS provides a really good service for finding the right (main) weather stations as well as a great variety of weather info like forecasts; the material is mostly easy on parsing. - Another abundant resource is yr.no, a collaboration of the Norwegian Broadcasting Corporation with the MET Norway, [link] (NO/EN) – The website on a European server is fairly legible without activated scripts, provides detailed free weather data, and gimmicks like webshots or XML or PDF downloads. It hasn’t been completely translated into English, since they mainly serve “tax paying Norwegians,” shouldn’t be a problem though.
- Deutscher Wetterdienst (DWD), [link1] (DE/EN), useful short addresses for speakers of German, [link2] , info on international activities, [link3] (EN)
- Popular commercial German language weather sites (not only for Germany) are wetter.com [link1] (DE/EN/E) and wetter.de [link2] (DE).
- Taiwanese Central Weather Bureau (CWB), [link1] (ZH/EN), international cooperation links, [link2]
[ ^ ] [ Contents ]
- Multinational examples
– The boundaries between national and multinational as well as public and commercial weather services are blurred. Decide yourself, of which the quality or the ease of weather data access is better.
[ ^ ] [ Contents ]
- Global user community services
- the already mentioned OpenWeatherMap, [link]
- For the record among other commercial ones, users alternatively may find the company wunderground.com interesting, [link1] . They got comprehensive and free services with a quite nifty API and a bigger community, but they make use of Gcogle Maps and the websites are too heavily scripted for my taste. However they provide nice icon sets, [link2] .
[ ^ ] [ Contents ]
4.2.5 Forecast examples
- yr.no, the case for the city of Cologne, Germany, [link1] – hourly forecast, [link2]
- yr.no, Busan, Korea, [link] (XML)
- diverse kinds of regional forecast by the ECWMF, [link] – just for the record, rather meant for professional and commercial usage
- NWS, Forecast Office New York State with interactive map and an extensive option link list, [link]
- Then clicking on “New York” at right coords will lead to that [link] presenting a detailed forecast.
- Another way to get a 7-day forecast would be to check for the “Text Product”, [link] .
- The alternative footer “Current Conditions | Observations (List)” item goes to a list with stations at local NY airports, [link] .
- Where in the following that one located at the Central Park presents the “latest” hourly reviews as a table, [link] .
- The case for Lowell, MA, tracking NWS as well as Yr, [link1] [link2] .
[ ^ ] [ Contents ]
4.2.6 Locating weather stations
- Find national and international Citizen Weather Observer Program (CWOP) weather stations here: [link] . Each station has its own detailed subsite, as well as some even got their own homepage; this should do it for our little project.
- An amazingly extensive list of weather stations even for Far Eastern locations like Beijing at yr.no, [link1] , or Seoul, [link2] .
- OMW for whatever reason does not share any list at all about its 40,000+ stations. There’s just a demo with a couple of blinking red lights whenever weather data is updated (needs some Google(!) scripts enabled): [link1] ; do they want the (registered) users to find them out somewhere in their “Data sources” themselves? [link] – As OMW does also not directly support to look for ICAO, it helps to add a country code, like so again for NYC Central Park: [link3] . Then check the given coordinates for that link to an OpenStreetMap with the station info layer switched on.
- Among the programs fetching weather data from International Civil Aviation Organization (ICAO) registered stations are the already mentioned conky, [link1] and xmobar, [link2] .
- U.S. National Center for Atmospheric Research (NCAR), alphabetical list of international ICAO stations: [link] (ASCII text file).
- free general geographic information system GeoNames: [link] ; e.g. yr.no relies on it
- alternatively, there’s OpenStreetMap (UK based): [link] (rem.: leads to the seemingly for whatever reason dA-lbacklisted org-domain), used by OpenWeatherMap
[ ^ ] [ Contents ]
4.2.7 “Weather arts”
- Since meteorological phenomena have ever been a topic in arts, sure there are also dedicated dA weather groups: [link]
- There are plenty of terrific icon set deviations: [link]
- An awesome weather icon font by Erik Flowers: [link]
- Found this comprehensive detailed icon set at the Norwegian public service yr.no lately: [link] (NO)
- Deutscher Wetterdienst, Kunst im DWD: [link] (DE)
[ ^ ] [ Contents ]
.: mws Screen # 2 :: UI Design :: Code Corner :: mws Screen # 1 :.
Comments welcome!