Longest Day vs. Hottest Day

Someone once told me that the San Francisco Bay Area has the longest time lag between the longest day of the year (the summer solstice, or June 21) and the hottest day of the year.  Wikipedia says:

Among major U.S. cities, San Francisco has the coldest daily mean, maximum, and minimum temperatures for June, July and August. During the summer, rising hot air in California’s interior valleys creates a low pressure area that draws winds from the North Pacific High through the Golden Gate, which creates the city’s characteristic cool winds and fog.

Once fall comes around, the interior valleys begin to cool down and the ocean is comparatively warmer, which stops the fog conveyor belt and finally lets temperatures warm up a little.  This means that the hottest days occur in late summer and fall.

I was curious whether all of this actually causes a particularly long lag between the longest day and the hottest day. Using publicly available hourly weather data going back about forty years for several cities around the United States, I calculated daily maximum temperatures and then averaged the day of the year for the ten hottest days every year. This tells you when, on average, the ten hottest days of the year occur. I decided to average the ten hottest days each year because there often isn’t a big difference between the hottest day and consecutive hot days, and because particularly hot days often occur in heat waves. Retaining the ten hottest every year emphasizes this.

The results are in a table below. As it turns out, the hottest day in Los Angeles occurs almost two weeks after the hottest day in Oakland (across the Bay from San Francisco)! In other words, the theory that the Bay Area has a particularly long lag between the longest day and the hottest day is busted. This may be because Los Angeles’ weather patterns are influenced by some of the same factors affecting Bay Area weather patterns, but clearly the specific factors governing exactly when the hottest days occur are more pronounced in LA than they are in the Bay Area. Also interesting is that Fresno, the main city in the Central Valley and the other Californian city on the list, has its average high temperature almost exactly a month after the solstice, along with New York and St Louis. This likely means that whatever factors governing when high temperatures occur along the coast are absent in the Central Valley.

City Hottest Date Average High (F)
Denver July 10 94.4
Chicago July 17 93.4
Miami July 18 93.0
Fresno July 20 106.1
New York July 20 91.5
St Louis July 20 96.3
Seattle July 26 89.1
Houston July 31 96.5
Oakland August 5 87.0
Los Angeles August 18 88.7

Cadillac Desert meets High Speed Rail

California is planning to start construction on the nation’s first high speed rail system early next year. However, the high speed rail authority in charge of planning and executing the project still has to overcome numerous obstacles.

One such obstacle is the opposition of Central Valley farmers. The Central Valley boasts some of the world’s finest farm land. The sun shines 300 days a year, and winters are mild. The crops grown here, such as almonds, tomatoes, oranges, and lettuce, are very valuable, yielding many more dollars per acre than corn or wheat, the cash crops grown in the Midwest.

In the Central Valley, farming is big business. Farmers are upset that the rail authority will use eminent domain to expropriate their land, and that whatever land they have left over will be much less valuable.

However, doing a little simple math shows that the amount of land to be taken over by the state for the project will be minuscule compared to the surface area of the valley. On its way from San Francisco to Los Angeles, the train will cross about 120 miles of Central Valley farm land. Assuming the right of way will be 300 feet wide, this yields an area of less than 5,000 acres. (By the way, 300 feet is a very conservative figure; as it approaches San Francisco, the train will use Caltrain tracks with a right of way of only 75 feet.)

Think about that for a second. 5,000 acres. Seven square miles. The valley has an area of 22,500 square miles. There are individual agribusiness operations that are an order of magnitude larger than this. I can’t help but think that these farmers are stalling in order to maximize their payout from eminent domain proceedings.

Granted, farmers are also upset that they may have to reroute irrigation channels, and that because there are no grade crossings, they will have to go many miles out of their way to reach their land. However, the authority is aware of these issues and has recently issued a white paper addressing them.

This project stands to benefit the entire state. The economic and environmental benefits are substantial. Central Valley farmers have received many billions of dollars worth of subsidies during the past several decades. They have been the principal financial beneficiary of California’s sordid water policy, as documented in Marc Reisner’s excellent Cadillac Desert. These policies were designed to encourage the settlement of lands that were, previously, too arid to support a dense human population. Now, that settlement has been achieved, and vast agricultural fortunes (and interests) have been endowed and made possible using public funds. It’s time for these interests to stop holding the rest of this state’s 37 million inhabitants hostage and to allow it to move confidently into the 21st century.


I recently bought a little tool that measures the amount of electricity used by your electrical gadgets.  It measures watts, amps, and voltage, in addition to a bunch of stuff I’ve never really heard of (frequency, power factor, and VA).  I work for a consulting firm that does work in the electric utility industry, and just let my nerdy/professional curiosity get the better of me.  I tested it on a few devices around the house and the results are pretty interesting.

By far the most energy intensive device was the microwave, which draws 1,500 Watts (1.5 kW) when in use, and about 3 Watts when not in use (to power the clock).  Next up was the TV/home theater system/PS 3, which drew about 270 Watts when in use and about 5 Watts when not in use.  However, during 40 minutes of streaming a show on Netflix, we used about 0.18 kWh worth of electricity, which really isn’t very much.  In fact, at the rate we pay to our utility, Pacific Gas & Electric, during summer evenings, we only spent about $0.02 on electricity while watching TV.  (According to PG&E’s rate schedule, October still counts as a summer month, because September and October are usually the hottest months in the Bay Area.)

While the TV and the microwave were fairly constant in their usage, it was interesting to see the spikes in usage when using the computer.  When it’s starting up or performing a task that is particularly CPU-intensive, usage spikes up to about 250 Watts, but when listening to music with the screen turned off, usage drops down to about 140 Watts.

The final device I tested out was an air filter/fan that is continually running in our bedroom.  That device draws about 9 Watts when on, which, again, isn’t very much at all.  If we turned it off, we would only save about a dollar on our monthly electricity bill.

Generally speaking, I was surprised that the use when these devices are on is fairly small, and that the problem of “shadow load” (load drawn by devices when they are turned off but still plugged in) seems almost non-existent.  I think this is mainly due to the fact that most new appliances are Energy Star certified, meaning that they are designed to minimize this problem.

SF Symphony (October 6)

/* snooty artsy snobby music alert */

I bought season tickets to the San Francisco symphony this year, and Friday night was the first concert of my subscription series.  Vasily Petrenko was the guest conductor.

First on the program was Arvo Pärt‘s Fratres, in the version for string orchestra and percussion. Pärt is an exponent of holy minimalism, a style of music with very simple materials with a “mystical focus.”  Fratres is based on a simple scale (D harmonic minor, starting on A) and simple building blocks of short melodies, punctuated with periodic percussion. Two double basses hold a drone on E and A the whole time.  The result is a beautiful, engrossing, meditative, and expressive piece of music. Petrenko and the SF Symphony’s performance was beautiful and very well thought out.

Next on the program was Bartok’s third piano concerto. French pianist Jean-Efflam Bavouzet was the soloist. Bartok wrote this concerto near the end of his life as a present for his pianist wife while they were living in New York during the Second World War. His health was failing as he wrote the piece; in fact, he was unable to finish it and only wrote the ending in a type of musical shorthand.

Before attending this concert, I had only listened to this concerto a handful of times. The dialog between piano and orchestra in the first movement reminded me of the piano concerti by Schumann and Grieg, and seemed a little clunky and derivative. The structure is consists of a fairly simple sonata form. I didn’t particularly care for this movement; the writing seemed fairly haphazard, and I don’t think it is Bartok’s finest work. Maybe that will change if I listen to it again. The orchestra was in fine form, and Bavouzet’s playing was very expressive and well articulated; however, it also seemed a little sloppy at times, and he did swallow some notes in certain places.

To me, the high point of this work is the second movement, the adagio religioso. Bartok, an avowed atheist, was certainly capable of expressing heartfelt spiritual sentiments. The movement starts with a very simple opening statement by the strings, reminiscent of Aaron Copland’s Americana with its open fourths and fifths. It builds up to a section of Bartok’s chirping night music and ends as it began. Bavouzet was in better form in this movement.

The final movement is much more extroverted and optimistic, and much more technically difficult.  This movement displays the strong influence of Hungarian folk song present in much of his work; it also contains a challenging fugato section. All in all, it forms a fitting conclusion to this work.

The second half of the concert consisted of Ottoroni Respighi’s Fountains of Rome and Pines of Rome, two programmatic four-movement tone poems for a symphonic orchestra of Mahleresque proportions. In these works, Respighi attempted to describe archetypical Roman scenes; indeed, there is a very overtly spelled out program, and at times the scene is very well described by the music. However, certain sections of this music are so enormous and bombastic that it seems he isn’t really describing pine trees or fountains at all, but something far greater and more majestic.

I’m fairly familiar with this music, and on hearing it performed live by the SF Symphony, two of Respighi’s influences became very clear. He was a student of Rimsky-Korsakov, one of classical music’s most renowned orchestrators. Respighi’s orchestration is beautiful and inspired, and his use of woodwind solos, off-stage brass, recorded bird song, and organ is remarkable. A second influence that struck me was that of French “musical impressionism,” particularly in the two slow movements of Pines of Rome. His chord progressions and harmonies are very reminiscent of Debussy and really help to set a beautiful atmosphere.

Again, the orchestra was in fine form for these works. Several soloists had an opportunity to shine (the first clarinet, in particular, stood out), and Petrenko was able to make the most of this orchestral barnburner.

How far can you see from a plane?

I’ve always wondered. As it turns out, it’s pretty easy to figure out with a little geometry!

Consider the (crudely drawn) figure below. Let equal the radius of the earth, let equal the distance to the horizon (how far you can see), and let equal the height of the airplane above the ground.

We have a little plane flying above the surface of the earth. As you look out the window, at some point, your gaze meets the horizon. At that point, your gaze makes a right angle with a line extending from the center of the earth to the horizon. From there, it’s easy to figure out what the value of d is, because the whole system – the airplane, the center of the earth, and the point where your gaze meets the horizon – forms a right triangle.

You can represent the whole thing with an easily solvable equation, like this:

Once you know that the radius of the earth is 6,378 km, you’re good to go. Assuming your plane flies at an altitude of 11km, or 36,000 feet, you’ll be able to see approximately 375 km (or 230 miles) in a straight line to the horizon.  That means that if you’re flying over Washington DC, you could see New York in the distance, or if you’re flying over London, you could see Paris.

On the other hand, if you’re standing on the beach, looking out at the ocean, and you are 180 cm (or .0018 km) tall, the horizon would be a little less than 5 km away.

Here is a little graph expressing distance to the horizon as a function of height above the ground. Those initial gains in altitude increase the distance you can see by quite a bit, but after a while the gains begin to slow down.

Read in September

Here are my reviews of the books I read in September.
  • The New Kings of Non-Fiction. Edited by Ira Glass. — Ira Glass hosts public radio’s This American Life, a show presenting weekly “non-fiction journalistic” stories on a variety of themes. This book consists of Glass’ favorite examples of what he terms “good writing” he’s collected over the years.  Topics vary from the life of the prototypical American pre-teen boy, to Saddam Hussein, to abstract art, to poker, to conservative talk radio, and so on. Like the radio show, the stories are very well put together and very engaging. Some stories were a little less successful than others (notably, the one about talk radio, which despite its interesting subject matter was too obtuse – too many footnotes, too many GRE words). Nevertheless, I highly recommend it.
    it was ok it was ok liked it really liked it it was amazing (my current rating)
  • A People’s History of the United StatesHoward Zinn. — I wanted to like this. I really did. Howard Zinn was a leftist historian who was one of the first academics to consider history from the bottom up rather than from the top down. For example, in the case of the discovery of America, this means thoroughly examining the impact of the Spanish conquest on indigenous peoples. In the case of the American revolution, it means considering the influence of common folks. While this is a laudable goal, Zinn’s effort falls far short, in my opinion. Many chapters devolve into a screed about strikes, unions, and riots. The writing often jumps from topic to topic in an illogical way. Many assertions go undefended. I picked up some interesting tidbits, particularly about the Vietnam war and Watergate, but otherwise I spent several weeks plodding through 600+ unsatisfying pages.
    didn't like it it was ok (my current rating) liked it really liked it it was amazing
  • ZeitounDave Eggers. — This is a novelistic portrayal of a true story. Abdulrahman Zeitoun is a Syrian immigrant living in New Orleans with his American wife, Kathy, and their four kids. He has his own house painting and contracting business and has grown successful. Like many “pull yourself up by your britches” types, he has undue trust in his own abilities and intelligence. When Hurricane Katrina comes along, it comes as no surprise that he decides to stay behind to watch his house and other properties around the city while  his wife and kids decide to leave the city. At first, everything is hunky dory – he rides out the storm, protects his house, helps some friends and neighbors, and even saves a few lives. But a few days later, the army comes a-knocking. I won’t provide any more spoilers than this.
    The book is very well written, in a clear and objective  style. The story and characters are fascinating. One reviewer commented that it is a tale of America’s two worst policy failures in the first decade of the 21st century – the War on Terror and Hurricane Katrina.
    One disturbing side note: Zeitoun was recently in the news because he abused his wife and reportedly took out a contract on her life, that of his stepson, and another man. In the book, Zeitoun comes across as a fundamentally decent person, and he and his wife have a complicated but loving relationship. However, this being the real world, we actually get to observe the “happily ever after” beyond the final pages, and we find out that it isn’t always so happy. Even if Zeitoun abused his wife, even if he is guilty of the charges against him, even if he is a scumbag at the core, the book does show that even a scumbag can, at times, do fundamentally decent things.
    didn't like it it was ok liked it really liked it it was amazing (my current rating)

Public Health Zombies

So it’s been over two years since I last posted.  I doubt anyone is still reading this, but I thought I’d share three interesting public health stories I read today.

First: Florida is experiencing the worst outbreak of TB in 20 years amid closing hospitals and decreasing funding for prevention.  The politicians backing the hospital closings claim that they knew nothing of the TB outbreak.  No one is claiming responsibility for what happened, but to me, the culprit is clear: decreasing funding for common-sense public health measures left an underclass of homeless and near-homeless people vulnerable to a disease that was considered wiped out fifty years ago.  Privatized medicine won’t serve these folks because they can’t pay.  Who does that leave to serve them, except the government?

Second: cases of black lung disease are on the rise.  Forty-year-old regulations simply can’t cope with new methods of mining and increased exposure.  Again, black lung disease was supposed to be wiped out decades ago.  Again, those affected are a relatively powerless group.  Mining companies balk at imposing more stringent safety standards because it would eat into their profits.  Again, who does that leave to help these coal miners, except the government?

Third: Botswana, one of the poorest countries in the world, has one of the highest rates of HIV infection – over 25% of the population has the disease – but the epidemic is now under control. All citizens have access to life-saving medications, and roughly 95% of the people who need these drugs are on them.

The moral of these three stories is simple.  Private entities don’t have the incentive to solve problems affecting the poor.  Charity doesn’t have the means to reach enough people.  Quite simply, the health of one person or one group of people, no matter how poor, is a public good – everyone stands to benefit, but no other person has an incentive to pay up – and thus government still has a role to play.


[Click for a larger version of the picture.]

Jenny & I took a day-trip to Yosemite yesterday. It’s a little too far away to only spend one day there (360 miles or 580 km round trip from San Francisco), but definitely worth the effort. We went on a hike on the western edge of the Yosemite valley — this picture is taken near Inspiration Point (aptly named!). We didn’t quite make it to Inspiration Point, because the sun started setting.

The waterfall is Bridalveil Fall.

“Mama”? No, “Pepsi”

Chance that a British baby’s first word is a brand name: 1 in 4.

Harper’s Index 2004

I’d like to see some of the details behind this study…

Why off-shore drilling isn’t worth it

The oil slick off the Louisiana cost is still expanding and is now approaching coastal marshes. The Coast Guard is now going to try to set fire to the slick in the hopes of dissipating the oil. Some commentators have (jokingly?) suggested that the US should simply nuke the slick and move on, like the Russians did several times during the Soviet era.

All of this craziness makes me wonder: what’s the point of all of this? Why even bother with domestic off-shore drilling at all? It’s often been said by level-headed observers that tapping off-shore capacity wouldn’t do anything to lower prices here in the US.

And what do you know — we can use our handy-dandy gasoline demand model to figure out how much of an effect on prices this oil would have. Instead of explaining gasoline consumption (making consumption the dependent or Y variable), we now explain gasoline prices (by making prices the Y variable.)

According to Energy Information Administration, U.S. off-shore capacity would max out at around 200,000 barrels per day. In gallon terms, this is about 8.4 million gallons per day, or .03 gallons (110 ml) per U.S. resident per day.

If we re-estimate the equation from several posts back, we get the following inverse demand function:

Here, we see that price goes down by 17 cents for every extra gallon consumed per person per day. δ is monthly variation; ε is error; Q is quantity per person per day; U is unemployment; and P is price, in cents.

Plugging in .03 gallons per person per day, the yield from U.S. off-shore drilling, we find that U.S. gas prices would be about .467 cents lower than before.

Long story short: off-shore drilling isn’t worth it. A .467 cent decrease in gas prices while running the risk of destroying our ecosystem in the same way the Louisiana coast is now being destroyed?

Not worth it.