https://github.com/bashrc2/tempgraph2
Commandline tool to plot global temperature data using data from the Global Historical Climatology Network.
https://github.com/bashrc2/tempgraph2
climate climatology
Last synced: 3 months ago
JSON representation
Commandline tool to plot global temperature data using data from the Global Historical Climatology Network.
- Host: GitHub
- URL: https://github.com/bashrc2/tempgraph2
- Owner: bashrc2
- License: gpl-3.0
- Created: 2021-11-17T11:29:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-11T10:12:23.000Z (about 1 year ago)
- Last Synced: 2025-01-11T11:26:27.537Z (about 1 year ago)
- Topics: climate, climatology
- Language: Python
- Homepage:
- Size: 238 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

This is a commandline tool to plot global temperature data using data from the Global Historical Climatology Network.
See https://www.ncei.noaa.gov/pub/data/ghcn/v4
Installation
============
To compile from source first install the prerequisites:
On a Debian based system:
``` bash
sudo apt-get install build-essential gnuplot wget marble python3
```
On Arch/Parabola:
``` bash
sudo pacman -S gnuplot wget marble python
```
Obtaining the data
==================
Before you begin you'll need to download the latest version of the GHCN version 4 data. tempgraph needs three files: the country codes, the weather stations and the temperature data itself. These files can be obtained here:
```bash
mkdir data
cd data
wget https://www.ncei.noaa.gov/pub/data/ghcn/v4/ghcnm.tavg.latest.qcf.tar.gz
wget https://www.ncei.noaa.gov/pub/data/ghcn/v4/ghcnm-countries.txt
tar -xzvf ghcnm.tavg.latest.qcf.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:
```bash
cp data/ghcnm.v4*/*.dat data/v4.mean
cp data/ghcnm.v4*/*.inv data/wmo.txt
cp data/ghcnm-countries.txt data/v4.country.codes
```
Usage
=====
``` bash
python3 tempgraph2.py
ls *.kml *.jpg
```