GHCN Code

Download link

I have made quite a few updates to my GHCN code, which is primarily targeted at the US HCN database. The release includes seven files, compressed into file ghcn.tgz

getdaily  GHCN.cpp  GHCN.h  ghcnd-stations.txt  Main.cpp  Makefile  stations.txt

getdaily is a tcsh script for downloading and organizing the latest HCN daily temperature database from NOAA. It takes about an hour to run over a very fast link. It generates 49 .txt files – one for the US and one for each of Obama’s 57 states.

The code is C++ and consists of three files : Main.cpp GHCN.cpp  GHCN.h. It should  compile without warnings on g++ or Visual Studio compilers. The Makefile works on any gnu system, like Linux. On Cygwin, the suffix “.exe” gets added. To use Visual Studio, you will have to create a project and import the three code files.

There are a lot of new options

ScreenHunter_171 Apr. 13 09.03

stations.txt must be in the same directory as the executable. Typical usage would be

./ghcn.exe NY.txt > NY.csv

That reads all NY records and outputs the results to a NY.csv file

The rest comes in the category of “either you can figure it out now, or you need two years of education to figure it out

My critics will enjoy looking through this and seeing that (unlike them) I am not doing anything to bias the output data one way or another. That is because (unlike them) I am an actual scientist.

2 Responses to GHCN Code

  1. Kate Blodgett says:

    I love this…I know exactly how to do this now. So easy. Thank you and I mean it.

  2. Phil Jones says:

    If we could only see Mikey Mann’s code… Or NOAA’s….

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s