Plot historical temperature trends

Bob Mottram 185450a451 Add marble 1 month ago
data 4a947a046b Update data set for 2019 4 months ago
desktop 087e87c419 Improved SVG icon 7 years ago
images c2540ae38b Additional images for wiki 7 years ago
man 4a947a046b Update data set for 2019 4 months ago
src 5339e6f202 remove gui 1 year ago
tgui-build efa3ffe6ef Example data set 3 years ago
LICENSE 7f1e93b4c1 License file 4 years ago
Makefile 92c297171f Remove gui elements from makefile 1 year ago
README.md 185450a451 Add marble 1 month ago

README.md

This is a commandline tool for educational or research purposes which generates graphs showing changes in average temperatures over time, using data from the Global Historical Climatology Network.

Also for temperatures below sea level see https://code.freedombone.net/bashrc/argograph

Installation

To compile from source first install the prerequisites:

On a Debian based system:

sudo apt-get install build-essential gnuplot wget marble

On Arch/Parabola:

sudo pacman -S gnuplot wget marble

To compile the command line program:

make
sudo make install

Obtaining the data

Before you begin you'll need to download the latest version of the GHCN version 3 data. tempgraph needs three files: the country codes, the weather stations and the temperature data itself. These files can be obtained here:

cd data
wget ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v3/ghcnm.tavg.latest.qca.tar.gz
wget ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v3/country-codes
tar -xzvf ghcnm.tavg.latest.qca.tar.gz
cd ..

The compressed archive contains two files, one which is the temperature data (.dat) and the other which contains details of the weather stations (.inv). I typically rename these to:

cp data/ghcnm.*/*.dat data/v3.mean
cp data/ghcnm.*/*.inv data/wmo.txt
cp data/country-codes data/v3.country.codes

Usage

For how to use the command see the manpage.

man tempgraph