[[ Check out my Wordpress blog Context/Earth for environmental and energy topics tied together in a semantic web framework ]]

Wednesday, November 30, 2005

T1 is no K2

According to A. M. Samsam Bakhtiari, we have moved from Peak Oil to a phase he refers to as Transition One:
In my humble opinion, we should now have reached 'Peak Oil'. So, it is high time to close this critical chapter in the history of international oil industry and bid the mighty 'Peak' farewell... At present, global oil output fluctuates around 82 mb/d as some institutions try vainly to push 2005 statistics towards 83 and 84 mb/d (as they always do). But they will be obliged to backtrack as 'actual' oil supplies fail to follow their 'paper' ones.
So that, in the 'Peak Oil' aftermath, we are about to enter what I call 'Transition One' [T1] --- a rather bizarre phase akin to a vague 'no-man's-land' between still adequate oil supplies and the clear realization that demand has definitely left supply behind. I see the tragic '2004 Tsunami' and the heart-breaking '2005 Katrina and Rita' as the precursors signs to 'T1'. This fresh phase might come to burst on the global stage during the coming winter 2005-2006 --- maybe taking large swaths of the public by surprise...
Fortunately, the hidden advantage of 'T1' is that worldwide oil supplies will remain almost constant during this initial phase, allowing those with foresight, intelligence and agility to begin preparing for the next, more-turbulent phases: 'T2', 'T3', .....
But if you believe this will cause people to rethink their energy extractionist ways, David Roberts passes it through the gristmill first:
It's this: Environmentalists seem to have a somewhat naive faith that once the concept of peak oil sinks in, people will move -- as though by the force of tides -- to support renewable, decentralized energy.

But why should that be true? A much more natural, predictable reaction would be to push like mad for more drilling and for more coal gasification. Both more drilling and more coal-to-liquid-fuel production would fit better with our existing infrastructure and practices, however environmentally malign they may be.

Tuesday, November 29, 2005

The Rugged Individualist

I took a respite today from The War Against the Car. Due to blowing snow, I took a pass on commuting via bike this morning and ended up losing a battle to the rugged in-duh-vidualists at the Walled Street Journal.
Welcome to the modern-day Luddite movement, which once raged against the machine, but now targets the automobile. Just last month, environmentalists organized a "world car-free day," celebrated in more than 40 cities in the U.S. and Europe. In the left's vision of utopia, cars have been banished -- replaced by bicycles and mass transit systems.
To be sure, if the entire membership of the Sierra Club and Greenpeace surrendered their cars, the world and the highways might very well be a better place. But for the rest of us the car is indispensable -- it is our exoskeleton. There's a perfectly good reason that the roads are crammed with tens of millions of cars and that Americans drive eight billion miles a year while spurning buses, trains, bicycles and subways. Americans are rugged individualists who don't want to cram aboard buses and subways.
Coming back to reality, I have found that the smaller U-locks work just as well as the bigger Kryptonites as a prophylactic against thieves. You can easily slip it in your pocket and just about any hand-rail will work. Strange that I finally figured this out after all these years.

I may have lost a battle today, but with my new lock cum brass-knuckle, I may end up winning the war.

Monday, November 28, 2005

Box full of nothing

Notice that nowhere in this article do they mention the average draw of a stripper well ("IOGCC's annual study showed 397362 marginal oil wells produced 311 million bbl in 2004, or an average of 2.14 b/d/well. -- O&GJ"):
Well, Well: Oil Rigs Return
New technology and rising demand for petroleum are fueling a comeback of drills in the Southland, where they once numbered 33,000.

By Roy Rivenburg, Times Staff Writer

They once ruled Southern California, staking claim to broad stretches of coastline and hillsides. Then, in the 1980s, they began vanishing -- driven from their native habitat by tract houses, mini-malls and pesky environmentalists.

By the time gasoline prices barreled into the stratosphere this year, local oil wells had become the industrial equivalent of an endangered species.

From a peak population of 33,000, they dwindled to about 4,000. Surviving drills were forced to forage in strange locations, such as restaurant parking lots, residential lawns and inside faux office buildings.

Today, these holdout rigs stand as a symbol of both a bygone era and -- oddly -- the future.

Because of technological breakthroughs and rising demand for petroleum, the previously doomed hulks have gained a new lease on life. And abandoned wells are being pressed back into service.

If crude prices spiral high enough, "it might get to the point where people start tearing down houses to drill for oil," said Rich Baker, who oversees the Southern California branch of the state Division of Oil, Gas and Geothermal Resources. "It's happened before ... and there's still a lot of oil left."

In recent months, "we've had companies putting 45-year-old wells back into production," said Rock Zierman, spokesman for the California Independent Petroleum Assn.

Iraj Ershagi, director of USC's petroleum engineering program, predicts that the number of abandoned wells -- about 3,000 statewide -- might soon drop to zero.

But he said people probably wouldn't notice the resurgence of drilling. Since 1943, when Shell Oil pioneered the first "noiseless" derrick -- swaddled in fluffy insulation -- oil pumps have grown increasingly adaptable to urban settings.

In Signal Hill, grasshopper-style rigs drill for oil behind backyards, next to a Starbucks, in public parks and on the edge of a cemetery.

At Huntington Beach City Hall, three drills lurk in the parking lot. Like giant mechanical mosquitoes, they spend their days slurping up syrupy crude from beneath the earth's skin.

Some wells try to blend in with their surroundings. In the waters off Long Beach, rigs have disguised themselves as tropical islands with 45-foot waterfalls, banana trees, hibiscus and carved tikis. At night, the illuminated oases look like "giant orange, lemon and blue Popsicles looming out of the sea," one writer said.

Elsewhere, drills have masqueraded as a Venice Beach lighthouse and a 13-story office building. The derrick at Beverly Hills High School hides inside a decorated tower.

But oil wells haven't always been so unobtrusive.

Flash back to the 1890s, when prospector Edward Doheny transformed a 60-foot tree trunk into a primitive drill and struck a vein of black gold near Echo Park. Aspiring Jed Clampetts promptly ripped up homes in downtown Los Angeles and planted a forest of oil derricks.

The same thing happened in Huntington Beach in the 1920s and '50s, according to news accounts. Colonies of pumps sprang up along local beaches. Just up the coast, Signal Hill became carpeted with so many derricks that it was nicknamed Porcupine Hill.

Then, in 1969, a massive oil spill tarred the shoreline in Santa Barbara -- and public opinion began to sour.

The backlash gained ground in the 1980s and '90s. As oil prices nosedived and land values and environmental restrictions soared, oil companies decided it was more lucrative to replace rigs with houses.

A surprising hunk of Los Angeles County and Orange County real estate now rests atop oil reservoirs, according to state maps of abandoned wells.

As oil attorney Bruce Webster once complained to Los Angeles magazine: "They ruined a perfectly good oil field by building a city on top of it."

2.14 barrels of swill per day for the privilege of having an oil rig sitting next to your kindergarten. I view it as easy money, best suited for the entrepreneur who enjoys starting up a fast-food restaurant, hiring a bunch of high-school kids, and letting the operation run itself. Certainly, this idea will attract lots of optimists, but do the math and, well, ain't that nothin'.


You're pushin' a furnace
You're workin' too hard
You're setting things off - all over the yard
You play with your top - till your eyes start to spin
Then you shrug your shoulders and ask me where I've been
Travel fulfills you but the distance it kills you
Oh oh ain't that nothin'
Why don't you tell me somethin'
Ain't that nothin'
I just wish you'd tell me something -
The fan keeps whirling
The wind stays hot - but I can't keep from slippin' a lot
I look in that purse
It's a blessing and a curse
Discover dishonor with its thousand commands
It ain't worth a shot
That target is sand
But I love disaster and I love what comes after.

Sunday, November 27, 2005

Problems with MSCE certification

From The Gristmill:
If you want to know what the young, internet-residing, tech-savvy crowd -- an influential if lamentably self-regarding demographic -- thinks about peak oil, read through the comments on this post over at Digg. Eye-opening, and not all bad.
Which proves that not all tech-savvy people have good judgment.

Too bad they can't all get invited en masse to the lecture at Cal Tech by Deffeyes. Vice provost Goodstein probably had something to do with this scheduling. And sure enough, he did.

Over at Stanford, EE professors David Miller and James Harris have made in my opinion a huge breakthrough in achieving opto-electronic responses in SiGe heterostructures. Although the advances don't show emission of light, a kind of Holy Grail for column IV semiconductors, they showed completely unexpected optical modulation properties 100 to 1000 times greater than conventional silicon.

I worked with a guy that got his PhD under Prof. Harris; I remember him saying that Harris never used his PC, which we both thought kind of odd. Which supports my claim that many a tech-savvy person doesn't need the "help" of Digg.com.

Friday, November 25, 2005

Local Action

In my neck of the woods, we finally see staff writers mentioning Peak Oil in the mainstream StarTribune daily. It looks like it took a combination of neocon James Woolsey, pseudo-Republican Matt Simmons, and a bipartisan Senate group to get the story to press. Local homerism dictate that they report on a push to increasing (mindlessly in my opinion) ethanol content to that of Minnesota standards. And this non-sequitur makes it par for the course for car dealership mafia:
Minnesota auto buyers' requests for hybrids such as the Toyota Prius and other fuel-efficient cars have accelerated since hurricanes Katrina and Rita sent gasoline prices temporarily soaring past $3 a gallon, said David Luther, chairman of Rudy Luther Automotive, one of the Twin Cities' largest dealerships. "I wouldn't call it a flood," he said.

Luther said some buyers of low-mileage SUVs seem to have the attitude that "they didn't save any buffalo for me."
? .. if I read that correctly, a most Dominionist attitude .. they didn't save any buffalo for me, God's will I guess, so deal with it. (apologies to Lawton Smalls)

Local weekly CityPages has a story on perhaps the number one science blogger, UM-Morris professor PZ Myers. Apparently number 3 locally behind the PowerLie'n and Captain Edd, Myers dedicates lots of time analyzing the wingnuts as they try to change the scientific landscape. As you can see from the chart that Powerline themselves posted, leading engineers and scientists don't buy the foolishness. Assmissile tries to explain the lopsided opinions on the the fact that these particular scientists and engineers belong to the National Academy of Sciences and Engineering. What do they expect? That they all belong to the Dominionist Union Local #666?

Stephen Gaghan writer of Syriana in an interview:
SG: ... and, particularly, THE PARALLAX VIEW, where at the end of the day, it's the military-industrial complex, and in CONDOR, Redford's on the steps of The New York Times, and he's going in there, and the guy says, "Y'know, the people that are behind me... do you really think they'll let you..?" And in the '70s, it was always the punchline. The last moment. "Ta-dah! It';s the oil companies and the military-industrial complex! Ta-dah!" And I thought today, with what's happened in the 30 years since then, is... FADE IN: It's the Oil Companies. Now what? The punchline's gone. The punchline's become the starting point. FADE OUT became FADE IN. Okay. Now what? The conspiracies are in broad daylight. Nobody's hiding them. The lingua franca has so changed in terms of what we would consider a conspiracy. I just... I thought, "What an interesting thing for this type of movie.";
The punchline has transformed into the premise of conventional wisdom. No wonder I haven't taken in many movies over the past few years. You can find a specialty blog associated with Syriana here (registration required).

Wednesday, November 23, 2005

Bookmark this date

Note that Kenneth Deffeyes predicted that Thanksgiving 2005 would mark the date for worldwide peak oil.

I don't doubt that Deffeyes will get arbitrarily close with this date but a few mitigating circumstances can work to prolong the peak. First off, worldwide peak does not behave the same way as a local peak (such as USA lower-48) would. Any local peak can occur with barely a whimper, as the oil suppliers transition to a different source depending on the current supply and demand. However, globally we have no alternatives and the response just about has to involve a ramp-up of extraction rates. This could extend the peak temporally, though not likely indefinitely. More likely, we will see the same effects that we see with UK North Sea oil or New Zealand natural gas or how the FSU plays out.

Secondly, we really have no idea what the hurricane season has wrought. No way that Deffeyes could have predicted the effects over the last few months, with the interesting caveat that it could work in favor of his prediction (a strong dip in production) or that it could lead to future spikes in supply. Either way, Deffeyes will get painted in one of two ways: (1) Wrong or (2) Lucky.

In other words, I see no winners in this race.

Tuesday, November 22, 2005

New Zealand Natural Gas Peak Model

After finally digging out some discovery data for natural gas (thanks to Rick at TOD), I generated a model for real world NG depletion based on the same approach I use for petroleum. The oil shock model has no real dependence on geology per se, as it simply models rates with first-order depletion (i.e. rate proportional to quantity left). With that reasoning I thought it would work just as well for natural gas reservoirs as it does for petroleum.

As a caveat, the statistical data for New Zealand NG does not contain any extra cruft. Just a few fields contribute to the sample space. This means that the stochastic approximations I make do not have as great a bearing on the results as a larger sample would, and deterministic effects consequently have a greater effect. However, the prospect of a "natural gas cliff" has some potentially huge ramifications; the New Zealand case study has proved the best example yet. So, if we model correctly, the cliff will show up -- whether we have determinism or not.

I used mean time constants of approximately 6 years for the fallow, build, and maturation phases and also 6 years for the 1/e "half-life" extraction time constant in computing the results. This generated the red curve in the following chart.

But clearly, right around the year 1996, you can see production (in billion of cubic feet) starting to ramp back up. To get this to work out, in the context of the oil shock model, I have to add a strong linear extraction rate increase (see the dotted green line).

Assuming no future discoveries, this shortens the half-life to just over a year by the time 2020 rolls around. Like the case of petroleum (i.e. UK North Sea oil), extraction rates have to increase to meet the needs of demand. Since New Zealanders can't get the gas from anywhere else, they basically have to follow the cliff down.

Sunday, November 20, 2005

Air America vs. Vapor Trails

Update:Bob Baer, author of See No Evil: The True Story of a Ground Soldier in the CIA's War on Terrorism, the memoir upon which the film Syriana is based, guested on AAR's Morning Sedition, listen here (interview starts about 3/5 of the way in).

Via Air America Radio:
New Document Shows Big Oil Dictates U.S. Energy Policy
A document from the White House may prove executives from big oil companies met with Vice President Cheney's energy task force in 2001. When the Oil Executives from Shell, BP America, Conoco and Exxon Mobil "testified" at a joint hearing last week in front of the Senate Energy and Commerce committees, they denied ever meeting with Cheney or officials from the Energy task force. This document gives specific names and lists specific times of meetings that took place in the White House between oil execs and task force staff members. The document shows most meetings took place with Andrew Lundquist, the task force's executive director.
I heard that the oil companies lied during the recent Senate hearings because Sen. Ted Stevens (R-Ak) allowed them to skip the oath. But, as a few authorities on the legislative and judicial branch note, they forgot about the implicit rule that lying to congress can get you 1 to life.

A few sensible senators have started serious discussions over oil saving measures. For a while this linked news story featured an ad for the Hollywood movie Syriana starring Clooney and Damon. The movie probably holds more truths than we can get from the administration and the oil companies.

On the wingnut front, quite a few peak oil debunkers have gotten quite active in swamping the fundie media with the equivalent of transitory vapor trails.

-- The Myth of Peak Oil
-- Fill'er up with Oil Sands! (with this unrelated thwacking by Tim Lambert of the sock puppet Fumento)

A WorldNutDaily article, 'Black Gold' strikes Big Oil 'nerve' -- Leading industry website drops book, column amid complaints, lashed out at fellow bloggers at PeakEnergy (MonkeyGrinder version) and The Oil Drum for disparaging "St. Jerome"1. It looks like their desperation to sell a book written by itchy nuclear triggerman and swiftboater Jerome "FatMan" Corsi, has caused them to publish a spate of spew:
All this in the past week, too. Somebody get them Kaopectate, quick-like.

1I feel relieved the WorldNutters didn't come after me; I fear I would have pooped my pants.

Saturday, November 19, 2005

Curb Global Warming

I caught a short Larry David interview on the Ring of Fire radio show. As part of this campaign, Larry/Laurie David put together quite a cast for a comedy special called "Earth to America!". The cast includes Jack Black Cedric "The Entertainer" Rob Corddry Larry David Will Ferrell Tom Hanks Julia Louis-Dreyfus Bill Maher Steve Martin Kevin Nealon (Subliminal Man) Ray Romano Martin Short Ben Stiller Wanda Sykes Robin Williams The Cast Of Avenue Q Robert F Kennedy Jr., Triump The Insult Comic Dog (Story at Grist.com)

I would definitely tune in tomorrow if I had cable. Nothing else has helped to put the brakes on behavior contributing to global warming; perhaps comedy will work its wonders.

The So-called Mafia of the Elite (SMOTE) has shown quite a bit of drive in bringing global warming issues to the media forefront. Fox TV had a show on last week concerning global warming. Some questions got raised on how they got head honcho Roger Ailes to support the production. Some say that Ailes got swayed by an Al Gore speech. I say doubtful based on his long-standing right-wing stance. I happened to catch RFK Jr on Ring of Fire last week and he said that Ailes owed him a favor based on their long-time friendship, dating back to time they spent together outdoors (camping I believe) many years ago.

Sign up for the Virtual March.

Friday, November 18, 2005

Hirsch has Scientific Capital

I took a bunch of potshots at the "Cold Fusion pioneer" Steven E. Jones recently. Essentially a publicity hound, tenured Jones really has little credibility (or scientific capital in BushSpeak) left. On the other hand, a real fusion pioneer, Robert L. Hirsch, has continually spoken his mind without fear of the consequences. Flashback to how he got fired from Rand for pointing out obvious problems concerning fusion.
Rand hired Hirsch in January 2001, and he began work on the report "Energy Technologies for 2050," a $200,000 study commissioned by the Department of Energy's Fossil Energy Program. His mission was to develop a methodology that could be used to evaluate the viability of energy technologies over the next 50 years. Then in October, Hirsch was fired.
Hirsch said he was abruptly fired for sharing a draft of the report, which he admits doing as a last resort, saying he feared the conclusions would not get out otherwise. Rand officials said they cannot comment on the reasons for the firing.
Which means that we better pay attention to the latest Hirsch report before it gets mysteriously disappeared.

Hirsch spends a bit of time understanding North Sea production and the mystery behind sharp peaks and sharp declines.

To understand the possible character of the peaking of world conventional oil production, oil peaking in a number of relatively unencumbered regions and countries was considered. All had significant production, and all were certainly or almost certainly past their peak. The data shows that the onset of peaking can occur quite suddenly, peaks can be very sharp, and post-peak production declines can be comparatively steep (3 - 13%). Thus, if historical patterns are appropriate indicators, the task of planning for and managing world conventional oil peaking will indeed be very challenging.

I could get the oil shock model to work for UK North Sea oil if I put a strong extraction increase near the peak of 1995. Up until that point the extraction rate was constant apart from some perturbations due to the Piper Alpha platform disaster.

Steady extraction/depletion rate of 10%.

Add rate increases.

What you end up getting. Bottom line: nothing by 2020. Maybe even nothing by 2010 if they increase the extraction rate or make no new discoveries.

Deepwater oil costs a lot of money; the oil company has an interest to pump out the oil as fast as possible. They can't afford to man an offshore platform over the years like they would a Huntington Beach stripper well sitting next to a McDonalds. So they go full blast once they detect peak coming -- which produces a high, sharp peak, followed by a steep decline. Bingo.

Let's call him Robert "Seymour" Hirsch in honor of the other Hersh with guts.

Thursday, November 17, 2005

Oil Depletion Model posts

--Updated Entry located here --

This blog entry contains the oil depletion modeling posts that I have written over the last few months. By and large, I have proceeded from a micro world view to a macro view, while adding interesting details that help me gain insight into how other mathematically-inclined people understand our current Peak Oil predicament.
A Micro Peak Oil Model
Part 1 | Part 2 -- Stochastic analysis on the small scale

A Macro Peak Oil Model
Part 1 | Part 2 -- Stochastic analysis on the large scale

Oil Shock Model
Intro | Continuous -- How disturbances affect depletion
RC Circuit (CAD simulation) -- Analogies to other processes
Code -- Generalized oil shock model program source code

And I have several posts which criticize the traditional Logistic1 curve but use the insight from the macro models as justification.
Issues with the Traditional Hubbert Model
Logistic vs Macro | Logistically Impossible | Logistic Curve Derivation | The Gamma Distribution

On more recent posts, I have tried my hand at fitting the shock model to historical stimulus and response data.
Fits to shock model using discovery data
Global using ASPO data (follow-up)
USA lower-48
UK North Sea
Former Soviet Union
What ifs?
Can we delay peak by upping the extraction rate?
Supporting information
Ramp-up data

1Wherever I say logistics, I mean logistic; probably due to too many years dealing with loggies at work. :)

Wednesday, November 16, 2005

Tuques wanted

I caught this wind-power site from a mention on the Morning Sedition radio show. Marc and Mark spent nearly an hour talking about hydrogen-fuel injection, hybrid cars, hydrogen fuel, and the curious Windship Hydrogen Production Systems courtesy of the Phoenix Project (not to be confused with the Apollo Alliance).

Some trucker happened to call in from northern Alberta criticizing the efficiency of hydrogen injection. Like I said in yesterday's post, the Canadians know the issues, will soon annex the USA, and I will have to get used to listening to Air Canada Radio with Bob and Doug.

In the next hour of the show, Morning Sedition writer/chief environmentalist Jim Earl started a harangue about cops indiscriminately targetting bikers in NYC for fines and such. Mark Riley pointed out that the conscientious bikers would have a higher likelihood of paying the fines, making the tactic pay off for the city. Somebody from Chicago called and mentioned that the Critical Mass events held during last year's RNC turned the police force sour against bikers. Most of the callers complained about bikers using the sidewalks; Earl came back with the obvious "improve the bike lanes" argument. A caller from Austin said that she sees the same problems in Austin, home of Lance Armstrong. I couldn't have laid out the issues better than this, as I freeze my tush biking in to work with sub-zero wind-chills in my face.

Jeez, I'm going to miss this show when it gets canned. sniff, sob, sniff

Who's chopping onions?

Steven E. Jones redux

Monkeygrinder didn't take the bait with this bit of news so I will.

"Cold fusion energy" pioneer Steven E. Jones recently went out on a limb concerning the WTC collapse, and the evidence keeps mounting that he seems to really enjoy doing this kind of thing, in a repeat-offender kind of way.

BobCousins at peakoil.com pointed out that Jones had also written a paper called "Behold My Hands: Evidence for Christ's Visit in Ancient America"

In it he shows old Mayan figurines of gods showing their palms cupped outward, ala Jesus Christ. From this he makes some wild claims, which you can guess from the title. (I think it proves that either the Mayans: came from a long line of beggars, they had endured quite a dry spell, or they invented silicone breast implants)

I have tracked down all his papers:

"Observation of Cold Nuclear Fusion in Condensed Matter"

"Evidence for Christ's Visit in Ancient America"

"Why Indeed did the WTC Buildings Collapse?

"Did Christ bomb the WTC?"

"Evidence that WTC buildings spontaneously fused"

"Osama visited the Pentagon and left a floater in the executive washroom"

"Watching my scientific reputation collapse"
Regnery Press, pre-publication

"Why won't anyone listen to me? What would JC do?"

(only half in jest)

Seriously, we need a better scientist to get behind this line of inquiry. I would completely back it if we could get someone like the recently passed Richard Smalley. But Jones just acts like a goof-ball. The "progressive=truth" cause doesn't need him.

Tuesday, November 15, 2005


I don't use a hit counter on this site, but I do keep an eye on where the visitors come from using the ClusterMaps global tracker.

I compared a snapshot of my site:

against an easily three times more popular techie site authored by Stowe Boyd:

If you look carefully, you will notice that Boyd's site has a more densely populated visitor pin-cushion in almost every part of the world except for a few sparsely populated yet "Western" regions -- Australia, Scandinavia, and Northern Canada.

Those people must know something I don't.

Anyone game to start a drilling operation in Churchill?

Update: And then I find someone linking me from Hawaii, channelling some other kind of energy source. Hemp perhaps? Or more likely, like John Nash's Beautiful Mind, some people need the mathematics to keep from going completely stir crazy.

Monday, November 14, 2005


The Desperate Optimist

Marc Maron, host of Morning Sedition radio, mimicing exasperated callers:
Why don't they talk about the issues?!
We're fighting for our LIVES here!!

The Resigned Pessimist

Bill Paxton acting in the movie Aliens:
Hudson: That's it man, game over man, game over, man! Game over!

May you live in interesting times.

Can we delay peak by upping extraction rate?


But at a price.

I first created a simplified oil shock model1 with a constant extraction rate (relative to reservoir size) and a clear primary peak. As an experiment I added a progression of linear increases in the extraction rate timed to start at the original peak position. I intended the increases to offset the decline in production and thus move the peak to the future.

As the following curves show, this linear shock does shift the peak, but not as much as one might intuitively predict. The amount of shift seems to fairly quickly reach an asymptotic value of perhaps 8 years total "delayed gratification", independent of rate increase. And then we get punished on the backside.

Why does this delay reach an asymptote? I suppose one could prove this but my gut tells me that it most likely occurs because the real decline exhibits an exponential decrease which swamps any linear increase in extraction rate. The increases simply cannot keep up with this relentless decline in reserves. In the worst case, even adding a 40% extraction rate per year at 2040 won't cut it.

The Cliff Notes summary
Try sucking the juice out of a Sno-Cone until you start seeing white ice. At that point, it doesn't matter how hard you suck. If you try real hard you might get one last slurp of flavor. But you might as well let it melt and get some Kool-Aid out of the rest.

1 Single discovery spike in 1960, with rates of fallow=build=maturation=0.1/year.

Race to the bottom, fueled by Ethanol !

I recently received this anonymous comment attached to an old post on ethanol:
For you Sherlocks exploring the curiosities of farm economics and power, why not check out Melvin Schramm (corn farmer) letter to the The Forum of Fargo-Moorhead, North Dakota (November 8, 2005) entitled "Corn Farmer Left Out of Ethanol Benefits". Curious Schramm doesn't mention ADM - the agribusiness behemoth which virtually controls the ethanol sector - by name but does question the "ag commodity groups" (which are all virtual toadies of ADM as well) The solution cannot be more welfare checks since the cupboard is almost empty - so is this the beginning "Death Rattle" for the American corn farmer?

The original letter:
Melvin Schramm letter: Corn farmer left out of ethanol benefits
The Forum
Published Tuesday, November 08, 2005

I found the articles in the Oct. 23 Forum about ethanol production and consumption, whether it was E-85 or some other blend, very interesting.

However, it seems someone has sold the general public a bill of goods. A number of people interviewed for these articles said at least using ethanol blends helps the farmer. What a terrible misconception! Can anyone explain to me how ethanol production helps the farmer when the price these plants pay for the corn is less than the cost to produce this corn? Right now, you as taxpayers are subsidizing the corn producers with loan deficiency payments of about 50 cents per bushel because the market price for corn is so low.

It amazes me that commodity groups like the Corn Growers, Soybean Growers, and Wheat Producers think having a market is the most important thing for a producer. I agree having a market is very important, but if it doesn’t return enough to cover the cost to produce the product, it isn’t much of a market.

All the free trade agreements the United States is pushing for are designed to give us access to another market where we can join the race to the bottom to value the product. The problem is when we undercut every competitor to get this market, everyone benefits except the producer. When we sell cheap grain, for instance, the elevators charge the same rate to handle the grain, freight rates stay the same, all the other entities involved with the sale make the usual, but since the final price is cheaper, only the producer takes a cut to make the sale.

We have too many people that think if we produce more we can sell it for less, regardless of the fact that fuel is over $3, anhydrous ammonia fertilizer more than $500 a ton, and all other costs continue to increase.

I am a firm believer in the production of renewable fuels, but the farmer must get a fair share from the market. The petroleum industry is making record profits that before were unheard of and the farmer needs a welfare check.

Melvin Schramm

Cathay, N.D.

Sunday, November 13, 2005

The Gamma Distribution

In typical use the oil shock model does not give a closed form solution. Because the input stimuli (normally provided by a set of discovery delta functions) needs to come from collected data and therefore displays a degree of randomness, we really should not expect anything approaching the symmetric simplicity of the Hubbert/logistic function :
dP/dt = k*r*e-r*T/(k+e-r*T)2
Yet, under a set of idealized conditions, a variant of the oil shock model does revert to a fairly simple representation, that of the gamma distribution, which involves the repeated convolution of an exponential curve with itself N times total. I mentioned this first in the micro peak oil model and it makes sense to repeat it again to close the loop. Normalized, the gamma distribution looks like this:
Plotted below with N=6, the gamma (in red) shows a distinct asymmetry with longer tails than the Hubbert curve (in yellow).

I chose N=6 to mimic a set of discoveries (the first 2 exponentials convolved together) convolved with the remaining four exponentials representing the fallow, build, maturity, and extraction phases of the conventional oil shock model.

I wouldn't typically use the gamma if I had discovery data available, but it does have the nice property of ease of use in data fitting applications and it has enough similarities to the Hubbert/logistic curve to serve as a replacement in traditional analyses. Plus its derivation rests on realistic first principles -- something in which the logistic function falls short.

Saturday, November 12, 2005

Derivation of the Logistic Function

I do not agree with the use of the logistic function to model Hubbert's peak oil curve. And I do not make this assertion out of some contrary empirical evidence, but rather from an understanding of how it got derived. So using the classical premise -- to vanquish your adversary, you have to understand him -- the following chalktalk provides some valuable ammunition via a quick rundown of the logistic curves derivation.

First off, the variations of the logistic curve go by a variety of names, such as the sigmoid function and solutions to the Verhulst equation, differing by the number of parameters and whether they pass through integration or differentiation phases. By most accounts, you generate the classical Hubbert curve by taking the derivative of the logistic function.

To derive this curve, we set up a relation representing population1 growth (p) as a function of time (t):
dp/dt = r*p*(1-p)
If we can solve in closed-form for p(t) and then take the derivative, we ostensibly get the Hubbert curve. (The derivation can get a bit more complicated if we add additional constant factors, but that comes out in the wash in any case).

To solve, we convert the above equation into a differential that we can integrate from time t=0 to T:
dp/(p(1-p)) = r*dt
This gets factored as such:
dp/p - dp/(1-p) = r*dt
The indefinite integral of this involves the natural logarithm:
ln(p) - ln (1-p) = r*t
ln(p/(1-p)) = r*t
To make it definite, we put in the integration limits from t=0 to t=T, and p=P0 to p=P.This results in:
ln(P/(1-P)) - ln(P0/(1-P0)) = r*T
ln(P(1-P0)/(P0(1-P))) = r*T
Converting this into the exponential, one gets:
P/(1-P) = P0/(1-P0) * er*T
After a substitution of K=P0/(1-P0), we get this function:
p(T) = k/(k+e-r*T)
The derivative of this gives:
dP/dt = k*r*e-r*T/(k+e-r*T)2

Note that the time progression or profile of the curve gets set by the value of p(0), which gets buried in the k term. This fact has important implications. That an initial condition can determine the shape of the curve puts it in the class of chaotic systems. Run this applet or this one if you want to get a feel for how this function evolves. Linear systems such as the oil shock model that I proposed previously do not suffer from this property.

Even more important than the chaotic property, the input stimulus of oil discoveries do not play into the logistic function formulation. If this stimulus in fact got added to the initial equation with something similar to the following delta function:
dp/dt = delta(t) + r*p*(1-p)
it would become impossible to solve in the same closed form as I have outlined above. In reality, only numerical techniques can solve this transcendental formulation. And even beyond that, we can drop one last monkeywrench into the works. As everyone who has studied chaotic systems understands, the most minor stimulus can have huge implications on how a system evolves.

Look up what happens when a "butterfly flaps its wings in China" and you can get the picture. My brain hurts just thinking about the possible effects of a Hubbert Butterfly Effect and I would dread even attempting to go down this path.

1 Why and how oil extraction follows a population growth model frankly puzzles me. Oil molecules do not fit into any predator/prey or birth/death models that have crossed my path. I choose to ignore the flaw in this basic premise to concentrate on the mathematical derivation beyond this point.

Friday, November 11, 2005

Beaker Breaking News

Steven E. Jones, the quack BYU physics professor, who brought us Cold Fusion version 1.1 (Pons and Fleischmann introduced v.1), has started down another goose-stepping path. Now he believes that bombs toppled the WTC on 9/11.

Forget that he never demonstrated the over-the-top and over-optimistic energy positive outcome as did his Utah-based cold fusion colleagues, Jones still benefited from the cold fusion hysteria of the late 80's. As I recall, he never downplayed the practical realities of the science of "Cold Fusion", instead preferring to engage in a high-profile fight with Pons for funding at their respective Utah universities.

Even though Jones latest theory may make some sense, his track record clearly shows that we can't afford to trust him. A number of scientists in the early 90's wasted both lots of effort and funding money -- money arguably better spent on other more incremental projects.

He made one big mistake already by committing a large sin of omission. We really should not buy anything this guy has to say. I bet that he doesn't want to get scooped on this bombing theory like he did by the Pons and Fleischmann characters. Too bad that he doesn't realize that getting scooped becomes irrelevant when the theory won't pan out in the end.

File under Pile higher.Deeper.

The coming meme on the Arctic National Wildlife Refuge as reported by the sanctimonious, pretentious, and unctuous radio douche-spigot Spew Spewitt:
ANWR is a national security issue. In a time of war, the actual production from ANWR is not as improtant as taking the steps necessary to get the oil to a position where it would be available to us if we were to need it because of supply disruption or, worse, a catastrophic attack on our facilities for importing oil.
Too late Spew Spigot, shut your damn tap off and face up to your shameful agenda-driven disingenuousness. You have not lifted one finger to point out oil depletion issues until now. But we know the drill you guys follow. First his corporatist buddies start to feel the heat, then Spew puts his douche-nozzle in full blast for their benefit.

Same thing with Spewitt's favorite mutual crotch-sniffing attorney buddy AssMissile:
In a slap at the party's conservative base, the leadership agreed to cave in to the environmentalist lobby on ANWR oil drilling, an absolutely inexcusable move in a time of high oil prices.
As I first reported last year, in the entire existence of PowerLine, you find nary a mention of oil depletion, at least, until now.
In a slap at the party's conservative base, the leadership agreed to cave in to the environmentalist lobby on ANWR oil drilling, an absolutely inexcusable move in a time of high oil prices.

Like Steven E. Jones, do not give these characters a second chance. They blew it badly the first time and if we follow any policy directions that they will try to force down the throat of their right-wing followers, we will just dig ourselves a deeper hole. And on top of a big mound of Juris.Dung, to boot.

Thursday, November 10, 2005

Wales Oil

Prince Charles has a habit of taking on too many marginal causes but some stuff has invariably stuck to the wall. At the "Peak Oil, Climate Change, and Business Action" meeting in San Francisco, he keynoted:
"We simply can't go on as we are," Prince Charles said to the select audience, according to the San Francisco Chronicle. He cited statistics and stories about global warming and oil depletion, contending, "Somehow we have to find the courage to reassert the once commonplace belief that human beings have a duty to act as the stewards of creation."

Update:Via Bart, more on the Prince and PO at Energy Bulletin:

"The Prince and the Peak" by Shepherd Bliss at http://energybulletin.net/10671.html (same as above)

Richard Heinberg's speech delivered at the conference with Prince Charles at http://energybulletin.net/10680.html


"This is another huge defeat for President Bush and shows his waning influence on issues that matter most to him."
in referring to this headline:

House GOP makes concession on Arctic drilling
Leaders drop hotly debated ANWR drilling plan from omnibus budget bill

  1. The numbers didn't add up; the estimate of 10 Bbls of oil equals a "drop in the bucket"
  2. Many big oil players showed little interest
  3. Distancing from poisonous BushCo associations with fear of continuing marginalization and possible backlash
  4. "Including the drilling provision in the Deficit Reduction Act would undermine the protection of all public spaces by valuing the worth of the potential resources contained within these lands over their conservation value... Rather then reversing decades of protection for this publicly held land, focusing greater attention on renewable energy sources, alternate fuels, and more efficient systems and appliances would yield more net energy savings."

Yet progress remains slow, as American oil sheiks testify before the Senate:
Ted Stevens refused to have these guys swear in. As David says, "The Republicans will swear in baseball players but not oil execs."

Wednesday, November 09, 2005

Richard Pombo (R - Easter Island)

They got it wrong. It doesn't end with a whimper. It starts with a whimper. Oldman points out the return to a comical hunter/gatherer society at the suggestion of a rather comical Republican congressman from California, Richard Pombo.
The Republican chairman of the House Resources Committee on Tuesday proposed waiving fees on collecting firewood in U.S. national forests as a way to help "families cope with the high costs of home heating" this winter.

Natural gas household heating costs in the U.S. Midwest will soar by nearly 50 percent this winter while heating oil in the Northeast will rise by 25 percent, according to government estimates.

"Rural American families who depend on firewood to heat their homes will be hit just as hard as those who use oil and natural gas," California Rep. Richard Pombo said in a press release.
Perhaps now I understand the significance of Bush's mysterious query "Wanna buy some wood?", during last year's presidential debate. We can answer that question with a resounding "no way!" Last time I checked, scavenging doesn't put a crimp on the old wallet, and the rethug brain-trust figures this an adequate substitute for a windfall-profits tax to redistribute wealth to the poor.

And another one from BOPnews: To hear the voice of Jerome A Paris on Chris Lydon's Boston-based public radio program, Open Source, click on the vintage cassette:

Oh Saka!

The intellectually dishonest blogger John Denver at PeakOilDebunked perhaps inadvertently reveals why he can take on a holier-than-thou attitude of completely eliminating his use of a car. From a previous post where JD lambasted Matt Savinar, J.D. of Life after the Oil Crash for responding, in a "rambling attack", to his own critics1, Denver stated this:
I am doing something, Matt. I do not drive a car. I paid a total $0 for gasoline last year, and have paid $0 for gasoline this year. My personal petroleum demand is zero. I live entirely on electricity, LNG, electric trains, bicycle and walking. I have done everything I can possibly do as an individual to eliminate my dependence on oil. I am also arguing the substantive issues of peak oil, and improving peak oil awareness, on this website. I am doing the very best I can as a human being to address this issue in a rational way.

For a brief moment, perhaps a nanosecond, I kind of admired this American's attitude (with a name like John Denver, he must live on some country road in Mayberry RFD, right?). However, this "green" outlook did not jive with the rest of his posts.

Now the funny part. JD lives in Osaka, JAPAN, where apparently no one drives a car, JD included. From the pictures he posted, you would think that driving a car would actually brand you as an iconoclast, a trait not always admired in the stereotyped Japanese culture. So the bit about paying $0 dollars makes a lot of sense -- in an intellectually dishonest way of course.

What did GW Bush say? Something about "you can't get fooled again", I think.

1 Which also means that if JD responds to my post in too defensive a posture, he will define himself as a hypocrite.

Tuesday, November 08, 2005

Pomp & Pay

I have reported on the leanings of former energy secretary James Schlesinger here, here, and here. As Schlesinger has made the most ruckus through his global warming apologist stance, I find it surprising that he has made significant public statements regarding oil depletion.
Addressing a select audience that included oil ministers and senior officials from the oil cartel Opec, the energy watchdog International Energy Agency, and the UN, plus advocates of a premature oil peak such as the former British cabinet minister Michael Meacher, Mr Schlesinger offered a graphic analogy.

The peak-oil threat and the response to it are reminiscent, he said, of the rumbles under Vesuvius and the reaction to them of its hapless residents. "The peak or plateau is coming," he said.
Having visited Mt. Vesuvius recently and making a half-hearted attempt to scale the peak itself, I believe the local residents understand the implications of living near a volcano. The road leading up the lower slopes harbors dilapidated restaurants, packs of wild dogs rooting through trash, and slobs making the rounds to discard of their garbage on the roadside. An ecosystem for canines at best.

Those further down the slope probably still hear the rumblings but somehow seem to think that a mile or two separation will protect them. Unfortunately we have it worse than the Vesuvians. Regarding our own energy predicament, an ocean's separations won't help a bit. As the Buckaroo saying goes, "wherever you go, ...".

And to top it off, in what should really pass off as fiction, the paid-off industry consultant Yergin will play the part of Nero, willing to throw meat to the lions and sit back and watch things burn:
The summit was entitled "The Spirit of the Empire," and that spirit - exemplified by Daniel Yergin's bravura performance - expressed itself in accordance with current global form. The rumblings below the Vesuvius of the hydrocarbon age could be heard loud and clear in Rimini. And the citizens of Pompeii elected to dream on.

[1] Jeremy Leggett's book on peak oil, Half Gone: Oil, Gas, Hot Air and the Global Energy Crisis, is published this week by Portobello Books.

Update: And on the day that The Guardian prints this article, they also fall for a free-energy fairy con-man as rooted up by Big Gav.

Monday, November 07, 2005

The Real Doomers

Every once in a while, doomerism rears its ugly head. Right about here, you'd think that I will refer to the latest Kunstler or an arbitrarily chosen peakoil.com denizen speaking about the hard landing we will face shortly. Slim chance or fat chance of that happening (which covers just about everything on the sliding weight scale).

Actually, doomerism has migrated to the right-wing political sphere, with a completely different set of potential outcomes. Doomers have suddenly become the right-wing nutjobs like radio host Hugh Hewitt, who has lately started to crow incessantly about his effectiveness in discussing Avian Flu and the carnage it may invoke. Which I find quite odd, because in the years I have spent listening to the Spew Spewitt nozzle (in an academic sense only, you see, you have to listen to them to understand them), I have never heard him discussing oil depletion as a worry, or even acknowledging it for that matter. Without cognitive dissonance interfering with my thinking, I would imagine that peak oil, with its own doomer scenarios, would have piqued Hewitt's interest over the years. And, what, nothing on the Hummer over-supply?

I only have one explanation for this curious behavior. Those that Marc Maron call the christo fascist zombie brigade want only one thing -- a combination of armageddon and the rapture to befall us with a sudden vengeance. Let me pose a rhetorical question to clear things up: Do they believe that peak oil does not pack enough of a bang for biblical purposes, and may land with far too much of a whimper? Know your evangelicals: Hugh Hewitt.

These kind of guys scare me more than the garden variety peak oil doomer. They play to their audience, and their audience thinks a rapture awaits.

The entire Furitan right-wing plays like a doom machine; although they project all capitalism as this side of hunky-dory, when they see their ideas of end-times coming, either conveyed as Avian Flu or Paris Burning, they start preaching to the choir. Heathens die, and Europeans go to hell.

Fortunately, we have Maron and his pal, the Cardinal Milfington, on the Rapture Watch to lighten things up. Halle-burton-lujah.

No doomer, Bill McKibben best describes what a soft landing may end up looking like. Thanks to Big Gav for the link. I rate McKibben highly on my list of non-fiction writers; read Long Distance if you want to understand the mind of an amateur endurance athlete.

Sunday, November 06, 2005

FSU oil shock model

I took a shot at fitting the Former Soviet Union (FSU) oil production data using the oil shock model. This graph from peakoil.net shows the discovery data superimposed on to the production data.

I transcribed the data from the chart (ignoring the extrapolated data) and used the general model source code.

I used a mean value of 5 years for each of the fallow, build, and maturation phases. This came out shorter than the 8 year latencies that I chose for the global and USA-48 model.

The green curve assumes a proportional extraction rate of 0.09/year (1/e time of about 11 years). This follows the production curve up until about the time of political instability in the Soviet Union. After that point, c.1984, I added perturbations according to the following chart, leading to the red curve which overlays the production data points.

The glitch occurring after 1984 looks benign but evidently carried some punch -- according to some interesting remarks I found previously, Reagan had a hand in it:
It seems likely that the Reagan administration, which took office in 1981, bearing in mind the economic havoc produced when US production peaked in 1981, followed by the Arab oil embargo and the "oil crisis" of 1973-74 and the deep recession that followed, decided to use the "oil weapon" to destabilize the USSR. Reagan embarked on a major military buildup, putting the Soviet Union under pressure to keep up. Meanwhile, declining prices after 1981 forced the USSR to pump more oil to supply its clients in Eastern Europe and to sell in world markets for hard currency. Then in 1985 Reagan persuaded Saudi Arabia to flood the world markets with cheap oil. Again, the USSR had to increase output to earn hard currency. This led to the second peak in 1988.
I see a more of a dip followed by a recovery rather than a strict oil production increase, which I imagine could result from a lagged reaction to market forces. The Soviets had no choice but to shut down their pumps temporarily -- they did not have the technology or reserves to increase production beyond what the big red Soviet machine could already provide. By the time 1988 arrived, it became too late for them to do anything about it, as the eastern bloc started to implode.

The post-Soviet transition shows a severe reduction in extraction rates. Clearly, the new FSU republics no longer had to produce oil to continue militarizing their bloc countries and allies (including Cuba). True free-market forces replaced the fixed demand and the new capitalists also had their eye on the green curve (peak oil in 1990). Much like the USA after our peak in 1970, they likely wanted to modulate the supply.

So what explains the reverse shock (i.e. sudden extraction increase) in the last few years? Note that the BP data also shows this FSU oil production increase. I don't know why, but OPEC production hasn't really gone up much over the past few years, and the FSU clearly has, or at least had the production capacity during the Soviet era. I would imagine that somebody has to make up the potentially widening supply & demand gap.

The model shows that at the current proportional extraction rate, the FSU has probably hit its secondary oil peak. They can conceivably try to keep on increasing the extraction rate (seeing as they do have that Soviet-era spare capacity, unless, of course, it all got sold by Russian scrap-iron merchants in the ensuing years). But remember, the law of extraction: the steeper the hill, the faster the decline post-peak.

Thanks to Big Gav to get me motivated to work on this analysis.

"I pledge not to go to war for oil" -- Jimmy Smits, fictional presidential candidate on the TV show, West Wing.

Interesting live presentation of the show.

Funny how it takes a fictional debate to bring a good discussion of energy issues to the American prime-time audience.

Saturday, November 05, 2005

Passive Writing

The previous post referred to the unfortunate side-effects that passive behaviors of the consumer culture, such as smoking and driving, have unloaded on the unwitting masses. Monbiot smartly extended the confined and annoying passive smoking to the open and routinely accepted practice of passive driving. The passivity of both exercises allows one to defer much of the responsibilities of his or her actions to an unspecified "everyone's doing it" rationale -- the sociological equivalent of gaseous diffusion.

If you haven't noticed by now, at least in a meta-blogging sense, I write completely in an active voice. Over the last year, I have completely dispensed with any passive writing constructs in my prose, eliminating all the words "is", "was", "were", "am", and the members of the "be" family. If you look through any past posts, you will find the passive constructs relegated strictly to quotes or in comments. Whether this means that I actually write actively, I couldn't tell you, and you would have to ask a grammarian if the language police should lock me up. I go by what my favorite all-time book, The Elements of Style by Strunk&White, says and they say "omit needless words" and "use the active voice". So I do.

Now you may ask, why attempt such a strategy on a stupid blog? To that I defer to the law of unintended consequences and what I have learned from the engineering requirements world. First, using the passive voice often prevents me from assigning responsibility for every action taken. For example, I can say "oil was found a few days ago", and you would have to click on the link to find out who found the oil. If I didn't have that link, you never would have figured out who actually found the oil. In general, using the active voice prevents that from happening and the unwitting masses do not get implicated by the spewing of passive declarations. I reduce the risk of unintended consequences by owning up to what I should naturally assume responsibility for and removing ambiguities from everything else.

Which brings me to the realization that link blogging in general suffers from a passive malady. As the vast majority of bloggers go link-happy while sitting in their passive-voice worlds, saying "it's so easy", I notice, sadly, that Strunk&White writing has gone out of style. Bob Somerby from the Daily Howler comes closest, while James Wolcott mixes it up so well that you don't care.

Whether constantly writing in an active voice causes displeasure to the reader, I can't say. When I read what I write, it may look stilted, but months from now I will have no problem figuring out the objects and subjects in my analyses.

But while I write it, it sure remains a pain.

Friday, November 04, 2005

Passive Driving, Senseless Flying

George Monbiot points out that relaxation of air pollution standards probably causes as much illness as passive smoking in public places.
As a cyclist, these failures drive me beserk. I refuse to own a car, partly because I believe it is wrong to fill other people's lungs with carcinogens. And so, while the drivers breathe their filtered air, I have to sit behind their tailpipes, drawing their excretions -- for I am exerting myself --– deep into my chest.
No wonder I identify so much with Monbiot; I like to think that I get some of my best ideas while using the human-powered variants of transport. Nothing like it to clear the mind -- before the pollution gets in there to do a number on your heart and lungs.

Another Brit, Zac Goldsmith, editor of The Ecologist Magazine, appeared on the Morning Sedition radio show this morning. Goldsmith talked about oil depletion, and actually had the nerve to bring up the taboo subject of mathematics :
"It's a matter of maths."
"It's a mathematical fact at some point there is going to be an oil crisis."
Good on him. He also discussed the idea of a tax on aviation fuel, primarily designed to reduce air-freight shipping. This idea addresses the absurdity of sending tuna caught in the Atlantic over to the far-east for canning and then shipping them back to the states. Or air-shipping apples grown in the UK to South Africa for waxing and cleaning before getting air-lifted back to the local Sainsbury's.

[MP3] (about the 93 minute mark)

Save Marc Maron's job at Morning Sedition, sign the petition.

Thursday, November 03, 2005

General Shock Model Program

I attached source code for a generalized command-line driven program that takes input discovery data (+ other parameters) and which then generates production curves from the date of first discovery to the present time (and on out into the future). The code basically refactors the specific code from other posts in the Oil Shock Model series, to get a better separation of data from the algorithms.

The program reads the input parameters from either a set of files (for yearly data) or from the term following the option (for fixed constants). It doesn't matter what units you use as long as they remain consistent with the other ones. The program sends the output data to the shell terminal.

File containing discovery data (continuous years, one entry per line)

File containing shock data (only years with discontinuities), two entries per line, "year" + (space) + "extraction rate that year". The program interpolates between entries, so to prevent shocks, give it only two lines (start and finish times) with the same extraction rate on each line.

Optional file containing production data (continuous years, one entry per line). The program doesn't do anything with this data; it only carries it over to make it convenient for comparison to the estimated production.

The 1/e rate for remaining fallow (i.e. 1 over the average time between discovery and construction)

The 1/e rate for finishing construction (i.e. 1 over the build time)

The 1/e rate for reaching maturing (i.e. 1 over the startup time)

Timespan for complete simulation

Typical invocation:
shockmodel.exe -1 0.2 -2 0.2 -3 0.2 -t 600 -d strikes.dat -p prod.dat -s shocks.dat > output

with Text_IO;
with Ada.Numerics.Elementary_Functions;
with GNAT.Command_Line;
with Ada.Float_Text_IO;

procedure ShockModel is
type Flt is array (Natural range <>) of Float;
type Flt_Access is access all Flt;

Expansion_Factor : constant := 10; -- Year subtics

Time_Span : Integer := 600;

-- Safe array retrieval function
function Get (Arr : Flt; I : Integer) return Float is
if I in Arr'Range then
return Arr (I);
return 0.0;
end if;
end Get;

-- Discretized convolution function
function "*" (A, B : in Flt) return Flt is
Total : constant Natural := A'Length + B'Length;
C : Flt (0 .. Total);
V : Float;
for J in 0 .. Total loop
V := 0.0;
for I in 0 .. J loop
V := V + Get (A, I) * Get (B, J - I);
end loop;
C (J) := V;
end loop;
return C;
end "*";

-- Discretized exponential function
function Exponential (L : Natural; Alpha : Float) return Flt is
use Ada.Numerics.Elementary_Functions;
R : Flt (0 .. L - 1);
for I in 0 .. L - 1 loop
R (I) := Alpha * Exp (-Alpha * Float (I));
end loop;
return R;
end Exponential;

-- Fills in data between discrete years
function Expander (Arr : Flt) return Flt is
R : Flt (0 .. Arr'Length * Expansion_Factor - 1);
for I in R'Range loop
R (I) := Arr (I / Expansion_Factor);
end loop;
return R;
end Expander;

-- Safe function for reading forcing function
function Discovery_Window
(Discovery : Flt;
Year : Float;
Start : Float)
return Float
Y : constant Float := Year - Start;
if Y < 0.0 then
return 0.0;
end if;
return Discovery (Integer (Y) * Expansion_Factor); -- Subdivide by factor
end Discovery_Window;

type Shock is record
Year : Float; -- Year of shock
Rate : Float; -- Rate of extraction
end record;
type Shocks is array (Natural range <>) of Shock;
type Shocks_Access is access all Shocks;

-- Make the shock a continuous function
-- by interpolating between points in the list
function Interpolate_Shocks (Year : Float; S : Shocks) return Float is
K : Integer := S'Last - 1;
for J in S'First + 1 .. S'Last loop
if S (J).Year > Year then
K := J - 1;
end if;
end loop;
return S (K).Rate +
(S (K + 1).Rate - S (K).Rate) * (Year - S (K).Year) /
(S (K + 1).Year - S (K).Year);
end Interpolate_Shocks;

-- Strikes into Mature Discovery
Strikes : Flt_Access;
Discovery : Flt_Access;

Phases : Flt (1 .. 3) := (others => 0.0);

-- Generates the mature discovery by repeated convolution
procedure Phasing is
Avg_Fallow : constant Flt :=
Exponential (Time_Span, Phases (1) / Float (Expansion_Factor));
Avg_Build : constant Flt :=
Exponential (Time_Span, Phases (2) / Float (Expansion_Factor));
Avg_Mature : constant Flt :=
Exponential (Time_Span, Phases (3) / Float (Expansion_Factor));
Discovery :=
new Flt'(Expander (Strikes.all) * Avg_Fallow * Avg_Build * Avg_Mature);
end Phasing;

S : Shocks_Access;
Production : Flt_Access; -- To compare against, optional

procedure Compute is
C : Float := 0.0; -- Reserve
Rate : Float; -- Extraction Rate
P : Float; -- Production Rate
DT : constant Float := 0.01; -- 1/100th of year
Start : constant Float := S (S'First).Year;
Finish : constant Float := S (S'Last).Year;
Time : Float := Start;
V : Float := 0.0; -- Volume of oil extracted
Data : Float := 0.0;
PIndex : Integer;
-- Integration of discovery window against extraction rate
Rate := Interpolate_Shocks (Time, S.all);
C := C +
Discovery_Window (Discovery.all, Time, Start) * DT -
C * Rate * DT;
P := Rate * C;
V := V + Rate * C * DT;
if Time > Float (Integer (Time)) - DT / 2.0 and
Time < Float (Integer (Time)) + DT / 2.0
then -- Print output only once per year
PIndex := Integer (Time - Start);
if PIndex in Production'Range then
Data := Production (PIndex);
Data := 0.0;
end if;
(Integer'Image (Integer (Time)) & "," & P'Img & "," & Data'Img);
end if;
Time := Time + DT;
exit when Time > Finish;
end loop;
end Compute;

function Get_Flt_Data (File : in String) return Flt_Access is
FT : Text_IO.File_Type;
function Get_Data (Data : in Flt) return Flt is
Value : Flt (0 .. 0);
Ada.Float_Text_IO.Get (FT, Value (0));
Text_IO.Skip_Line (FT);
return Get_Data (Data & Value);
when Text_IO.End_Error =>
return Data;
end Get_Data;
Text_IO.Open (FT, Text_IO.In_File, File);
return new Flt'(Get_Data (Flt'(1 .. 0 => 0.0)));
end Get_Flt_Data;

function Get_Shock_Data (File : in String) return Shocks_Access is
FT : Text_IO.File_Type;
function Get_Data (Data : in Shocks) return Shocks is
Pair : Shocks (0 .. 0);
Ada.Float_Text_IO.Get (FT, Pair (0).Year);
Ada.Float_Text_IO.Get (FT, Pair (0).Rate);
Text_IO.Skip_Line (FT);
return Get_Data (Data & Pair);
when Text_IO.End_Error =>
return Data;
end Get_Data;
Text_IO.Open (FT, Text_IO.In_File, File);
return new Shocks'(Get_Data (Shocks'(1 .. 0 => (0.0, 0.0))));
end Get_Shock_Data;

-- Command line options
case GNAT.Command_Line.Getopt ("1: 2: 3: t: d: s: p:") is
when ASCII.NUL =>
when '1' =>
Phases (1) := Float'Value (GNAT.Command_Line.Parameter);
when '2' =>
Phases (2) := Float'Value (GNAT.Command_Line.Parameter);
when '3' =>
Phases (3) := Float'Value (GNAT.Command_Line.Parameter);
when 't' =>
Time_Span := Integer'Value (GNAT.Command_Line.Parameter);
when 'd' =>
Strikes := Get_Flt_Data (GNAT.Command_Line.Parameter);
when 's' =>
S := Get_Shock_Data (GNAT.Command_Line.Parameter);
when 'p' =>
Production := Get_Flt_Data (GNAT.Command_Line.Parameter);
when others =>
raise Program_Error; -- cannot occur!
end case;
end loop;
when GNAT.Command_Line.Invalid_Switch =>
Text_IO.Put_Line ("Invalid Switch " & GNAT.Command_Line.Full_Switch);
when GNAT.Command_Line.Invalid_Parameter =>
Text_IO.Put_Line ("No parameter for " & GNAT.Command_Line.Full_Switch);
end ShockModel;

Wednesday, November 02, 2005

Paean to Air America Radio

I wrote up a tribute to the hosts on Air America Radio here. I had it brewing in my head for a few weeks, but then had to finish it when I found out that AAR management wanted to dismantle the brilliant Morning Sedition radio program by not renewing cohost Marc Maron's contract.

The freeform-station-of-the-nation WFMU provided an even better tribute to Marc Maron, here.

I repeat that AAR remains the only broadcast medium willing to regularly talk about our current energy predicament. For example, co-host Thom Hartmann, substituting today for the Majority Report duo, just had a discussion about energy profiteering with a representative from the Ayn Rand institute taking on the corporatist position. (Hartmann will also appear on a global warming special tonight on Public Television, unfortunately I can't listen and watch at the same time)

Sign the petition to keep Marc Maron on the air.

Or write to:
Air America Radio
641 Sixth Avenue, 4th Floor, New York, NY 10011.
Phone: 212-871-8100
FAX: 212-871-8133