$ date +%s 1234576750If you have no idea what I'm talking about and you're using a computer with an enlightened command-line interface, this:
$ man datemay help explain it. Or not.
I just finished a pair of books that take place around the time of the Civil War and the years following. Both stories are told from multiple points of view, but the similarities end there.
Peter Matthiessen’s masterwork of fiction Shadow Country is a reworking of a book he wrote decades earlier, and which was originally split into three separate books. It tells the story of “Bloody Watson,” a real person who was suspected of a multitude of murders in southern Florida and who was gunned down by his neighbors after the great hurricane of October 1910. The first “book” is composed of a series of short chapters written in the voices of the people who were present when Watson was murdered, the second is from the perspective of his son, and the third is a first person accounting by Edgar Watson himself. It’s a great way to tell a story, not only because each section comes from a different perspective, but because each “author” lived a very different part of the same history. The accounts overlap, of course, but in ways that draw you into the mystery of Watson’s life and his family rather than simply telling the same tale from different angles.
For such a long book, it held my attention throughout, and involved places and times I’m really not all that familiar with. And knowing what little I do know about the Everglades region of Florida, it’s likely that there’s nothing left of the world Watson lived in. Most of that is a good thing—the relationship between the races and sexes was harsh and brutal—but it would be great to see what the Everglades looked like before much of the wildlife was shot out and the structure of the region was changed.
The second book I read this month is Chris Adrian’s first novel, Gob’s Grief. I read The Children’s Hospital in 2007, and came away wanting to read more from Adrian. Gob’s Grief isn’t as spectacular as The Children’s Hospital, but it covers a lot of the same ground; angels, spirits, life and death. And just like The Children’s Hospital, he somehow manages to keep the story grounded in reality.
A couple asides: the dog in the photo is Deuce, who finally figured out (last month) that sleeping on dog beds was better than sleeping on the floor. I tried setting the books next to him laying on a dog bed, but he couldn’t handle that. So that’s the best photo I could get with him and the books in it. Nika is out in the dog yard and the other dogs are at the races with Andrea today.
After looking at the list of books I read in past years on the sidebar, I realized that they were in chronological order, but reverse chronological order makes a lot more sense in the context of a blog (where the most recent post is first) and for the sidebar. So I reversed them with a quick Python script. Here’s my reverse.py:
#! /usr/bin/env python import sys lines = sys.stdin.readlines() lines.reverse() for line in lines: line = line.strip() print(line)
To use it: cat file | ./reverse.py > reversed_file
The cold snap of 2008/2009 has finally broken. The plot below comes from my Ninety day weather summary plot for the Fairbanks Airport weather station (PAFA). That web page has a description of all the variables shown on the plot, but here I’m interested in the vertical red bars, which represent the high and low temperatures for the day. You’ll notice that from December 27th through January 11th, the temperature was far below normal (the 30-year normal high and low temperature are the solid blue, mostly horizontal lines. Record high and low temperatures are the green x marks. We didn’t come close to breaking any low temperature records.
So how does this cold snap compare to those in the past? Most people cite the cold snap of 1989 as the one they remember. Was the current period comparable?
My first attempt at answering this question was to generate a list of consecutive days where the low temperature for the day was below -40. It’s a fairly complex query because we need to compare a table against itself, and we need to report the results from both rows that match. Here’s the SQL:
SELECT a.dt, a.min_temp, a.temp, a.max_temp FROM isd_daily AS a INNER JOIN isd_daily AS b ON a.isd_id=b.isd_id AND a.dt=b.dt - INTERVAL ’1 DAY’ WHERE a.isd_id=’702610-26411’ AND a.min_temp<=-40 AND b.min_temp<=-40 UNION SELECT b.dt, b.min_temp, b.temp, b.max_temp FROM isd_daily AS b INNER JOIN isd_daily AS a ON a.isd_id=b.isd_id AND a.dt=b.dt - INTERVAL ’1 DAY’ WHERE b.isd_id=’702610-26411’ AND a.min_temp<=-40 AND b.min_temp<=-40 ORDER BY DT
The output is a list of consecutive dates and temperatures. From there, I wrote a Python script to read these periods and calculate the length, average temperature, average minimum, and the cumulative degree days below freezing. Using this metric, our recent cold snap was the coldest since the cold snap of 1989. Here are the two compared:
For period between 1989-01-19 and 1989-02-01 Days = 14 Average temp = -42.9 Average minimum = -48.0 Cumulative degrees below freezing = 1048.7 For period between 2009-01-02 and 2009-01-11 Days = 10 Average temp = -40.8 Average minimum = -44.8 Cumulative degrees below freezing = 728.0
You can see that this doesn’t include the first portion of the cold snap, because the low temperature on New Year’s Day was a balmy -38°F. So it doesn’t seem like it really captures the full length of the recent event.
The other approach I tried was to examine the entire historical record, calculating the average temperature for all periods of various lengths. It turned out that a window of 16 days resulted in the highest ranking. But even so, it was the 62nd coldest 16 day period between 1946 and the present. You can see the reason why the ranking is so low if you look at the results:
rank Date interval avg temp (°F) 1 1947-01-17 - 1947-02-01 -47.19 2 1947-01-18 - 1947-02-02 -47.06 3 1947-01-19 - 1947-02-03 -46.84 4 1947-01-16 - 1947-01-31 -46.82 29 1989-01-17 - 1989-02-01 -41.43 30 1989-01-18 - 1989-02-02 -41.27 32 1989-01-16 - 1989-01-31 -40.96 35 1989-01-19 - 1989-02-03 -40.58 47 1989-01-20 - 1989-02-04 -39.56 48 1989-01-15 - 1989-01-30 -39.53 62 2008-12-27 - 2009-01-11 -38.07
The top four coldest 16-day periods were all part of the same, longer cold snap, that lasted from January 16, 1947 through February 3rd of that year. Because the entire period was so cold, it yielded the top four coldest 16-day periods. I also included the intervening 1989 cold periods for reference. You can see that the 1989 event was also much longer than the 14-day interval identified by the consecutive days below -40 technique. The average temperatures over the 1947 events are quite impressive when compared to the recent average and the 1989 event. As bad as it seemed, we don’t really have much too complain about.
> books_per_foot = c(14,11,17,11,10,18,12,12, 13,16,15,14,13,14,15,8,10,10,11,11) > summary(books_per_foot) Min. 1st Qu. Median Mean 3rd Qu. Max. 8.00 11.00 12.50 12.75 14.25 18.00 > mean(books_per_foot)  12.75 > sd(books_per_foot)  2.613225With that information (12.75 books per foot of shelf space with a standard deviation of 2.61 books) and the total length of each bookshelf, it ought to be relatively easy to extract a listing of what books to put on each bookshelf. Actually moving them will be more of a challenge!
Last winter our vent pipe froze solid and I spent a couple hours in the attic with a heat gun melting the blockage. A couple days ago I noticed that flushing the toilet was pulling water out of the traps in the sink and bathtub, so I knew the vent was getting plugged again. My attempt at a fix over the summer was to put a larger pipe over the vent on the roof so the condensation might happen in the outer pipe, which could be easily removed and cleaned out. Unfortunately, when I got up on the roof today, not only was it impossible to get the outer pipe free, but the growing constriction wasn’t in the outer pipe anyway. Mid-summer my neighbor suggested replacing the section of the vent in the attic with a much larger diameter pipe (6” was his suggestion) and then insulating it. I never got around to it; almost frozen vent pipe; a priori.
The total freezing degree days to this point in the winter season has been 2,258,† which ought to give me a pretty good way of estimating when I’ll have another problem. Thus far we’ve had 74 days with an average daily temperature below freezing, and the average temperature for those days was 1.4°F. That’s below normal for the year: nine of the last eleven weeks have been below average. But the heart of the winter is approaching, so it’ll take many fewer than 74 days to double our freezing degree days for the season.
My first attempt to fix the clog was to insert a heat gun into the clean out and let the warm air from the heat gun melt it (shown in the photo). I don’t think this had any real effect. I kept it going for a little over an hour, monitoring the backside of the pipe to make sure the heat gun wasn’t melting it. But it was around -10°F this morning, so I’ll bet the hot air was pretty cold by the time it rose to the ice. The second attempt was using a pipe snake from up on the roof, but it couldn’t go past the constriction, and even if it had, I’m not sure it really would have cleared out much ice. Finally, I dragged a five gallon bucket filled with hot water up onto the roof. I got about three gallons into the vent before it was filled to the top. At first I was nervous that this wasn’t going to work and I’d have three gallons of water turning to ice in the vent, but the water started dropping slowly, and after a minute, the blockage gave way and hot water came plunging down the pipe. I poured the final gallon or two through the pipe, and came down off the roof.
Tomorrow I’ll put some 2” fiberglass insulation around the part of the pipe that’s exposed in the attic, which should help. And I’ll be keeping my eye on the total freezing degree days for the rest of the winter. Once it gets up to 4,000, I may want to go back up on the roof with another bucket of hot water.†SQL query from my weather database: SELECT sum(32.0 - t_avg::double precision) FROM daily;