How stations will be presented

The raw data was downloaded from Environment Canada’s website using this routine:

Dim FSO As New FileSystemObject
Dim TextObj As TextStream
Dim FromThis As String
Dim RecItem As ListItem
Dim Maindb As MCSADODB

FromThis = “<table class=” & Chr(34) & “dataTable” & Chr(34)
ToThis = “<form action”

Set Maindb = New MCSADODB

Maindb.OpenDB “L:\global warming\Databases\”, “MasterStations.mdb

For Each RecItem In LocationsList.ListItems

If RecItem.SubItems(3) = “” Then

If RecItem.SubItems(2) = “CC” Then

If Not FSO.FileExists(“L:\global warming\RawTextFiles\” & RecItem.Text & ” RawData.txt“) Then

RecItem.SubItems(3) = “Downloading”

Set TextObj = FSO.CreateTextFile(“L:\global warming\RawTextFiles\” & RecItem.Text & ” RawData.txt“)

For YearIndex = 1900 To 2009

For MonthIndex = 1 To 12

Text1.Text = “” & RecItem.Text & “&Year=” & YearIndex & “&Month=” & MonthIndex & “&Day=1&format=csv&type=dly

ReturnedString = Inet1.OpenURL(Text1.Text)
ReturnedString = Replace(ReturnedString, “,”, Chr(9))
ReturnedString = Replace(ReturnedString, Chr(34), “”)
TextObj.WriteLine ReturnedString

List1.AddItem “ID=” & RecItem.Text & “, Year=” & YearIndex & “, Month =” & MonthIndex, 0




RecItem.Bold = True
RecItem.SubItems(3) = “Yes”


RecItem.SubItems(3) = “Previous”

End If

Maindb.EditRecord “Stations”, “StnID“, StationID

Maindb.SetFieldDownLoaded“, “Yes”


End If

End If



MsgBox “done”

Each station raw data was stored in a text file. A VB6 routine was then run on those text files to import the records into an Access database, one for each station. The raw data was stored as is in one table. It was then appended into a second table clearing out any nulled values. This second table contained only the date fields, max temp, mean temp and min temp fields. All analysis was done on this table.

Each database was then looped to get a summary of the range of dates, number of records for each station and stored in a master mdb file. This database will also be used to store the trends for each stations so that regional and country summary can be easily calculated.

The data was also broken into regions. West Coast (BC), Central Canada, Southern Ontario, Quebec south, Maritimes, and Arctic. A separate mdb file was created for each of these and all stations for that region appended into it.

Analysis was done using Excel files. A VB6 routine was written to execute the required query in the station mdb file, copied, and then pasted into a template xls file, the range of the series of the graphs changed to match the number of records, the trend equations copied and pasted into cells and the master mbd, and then saved by the station id. Thus one xls for each station.

Each station will be presented in the same way as outlined in my second video.

Each temperature graph will contain the following:

  • Highest of the max temps plot and trend with equation.
  • The upper Standard Deviation of the max temps plot and trend with equation
  • The average of the mean temps plot and trend with equation
  • The lower Standard Deviation of the min temps plot and trend with equation
  • The lowest of the min temps plot and trend with equation

These five points on a graph will show the entire range of yearly temps, not just the average of the mean which is the one AGW proponents use to claim the planet is getting hotter.

At the top of every graph is a summary of the trends over the length of the station’s temps.

Each station report will also contain the following graphs:

  1. Length of winter, calculated based on the number days from the first night fall frost to the last night spring frost (the growing season).
  2. The number of hot days. AGW proponents claim the planet is heating up, there will be more heat waves. If so, this graph should show that, if it’s true.
  3. The number of extreme cold days.

Each station will also contain a precipitation graph showing rain and snow fall for that location.

Any specific stations presented here individually will be chosen based on the length of data they contain. The criteria will be that a station must have at least 80% of the days from Jan 1, 1900 to Dec 31, 2009. Because so few stations fit into that criteria, there will hence be few stations that will fill the criteria.

The next post will evaluate the state of all the stations.


About J. Richard Wakefield

J. Richard Wakefield has published three fiction novels, Blinding White Flash, Blinding White Flash Invasion and The Barn. The sequel to The Barn, The Cunningham Arrests, is going to the publisher in 2015. He was a firefighter for 22 years in Toronto, and a professional computer programmer for 25 years. He lives with his wife, Dorothy, in Southwestern Ontario.
This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to How stations will be presented

  1. Denis says:

    Interesting site, I bookmarked it.
    I started also to do automated downloading of the climate datafiles.
    Can you tell me where I can find a list of all available canadian StationID ?
    I found a list of stations in the mestat1.txt file from here but it gives only international ID numbers, which are totally different than the StationID to use in the HTML requests.


Leave a Reply

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

You are commenting using your 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