UNHIDING THE DECLINE

Update : There were some errors in the initial release. Please try again.

This is the initial release of my new GHCN software, titled UNHIDING THE DECLINE. It is designed to allow you to process large GHCN databases on a small computer with little memory, and make graphs very quickly.

The initial release is just for people who have python available. This includes any Mac or Linux user, and any Windows user who is willing to make the effort to install python3 and a gnu environment like cygwin or mingw. I will release a Windows exe file soon.

Open a terminal window

python3 -m pip install matplotlib
python3 -m pip uninstall numpy
python3 -m pip install numpy==1.12.1

Download these two files from dropbox :  GHCNPY.tgz  get
tar xzvf GHCNPY.tgz
cd GHCNPY

Try this command to reproduce the plot above. It will take several minutes to bring the screen up, as it has to process the data

python3 ghcn.py US.txt summer text=”USHCN”

You can generate hundreds of different graph types very quickly by simply clicking on an X-axis option (left column) and Y-axis option (right column) .  Click on the “Save Image” button to create a .png file, which is in the same directory you ran the ghcn.py script from. It also generates a csv file in that directory with all of the stats.

Other command line options include

  • spring
  • fall
  • month=[1-12]
  • date=[mmdd]
  • first_year=[yyyy]
  • last_year=[yyyy]
  • target_type=[MIN/MAX/BOTH]
  • target_min=[temperature F]      (used for stats)
  • target_max=[temperature F] .   (used for stats)
  • state=[AZ/AK/CO…..]
  • required_range=[YYYY:YYYY] . ( station must have been active in both years)

The algorithm is very simple.

  1. Average all daily temperature records for one station for one month (that is how NOAA organizes them)
  2. Average all of the 1200 station averages for that month
  3. Repeat for all 12 months, and all years from 1895 to the present.

That is it. The algorithm is an improvement over my previous software, which lumped all daily data from all stations together per month. That unfairly weighted stations which reported more days relative to stations which reported fewer days.

To update the USHCN database, change the permissions on the bash get script, and run it “./get” . That will create a new US.txt file.

If you find any bugs, let me know! There may well be some. I just started this project last weekend. I’ve been at this for 12 straight hours and need to get out on my bike!

About Tony Heller

Just having fun
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *