Partly due to the title of the original post I think a lot of people are misinterpreting the issue here.
Sudden surges in wind capacity are not "disrupting the grid." nothing is broken, there are no alarms at the control station. What's happening is simply that during brief bouts of strong wind, the wind turbines are generating so much electricity that the Pacific Intertie (which carries power from Oregon to California) cannot carry it all. Power schedulers are feathering the blades of wind turbines, meaning the blades are being turned to parallel with the wind so that the turbines generate less electricity.
What does this really mean? To be honest, it's not a big deal. Frankly, I think it's cool - at times we're generating so much power with our wind capacity that it's exceeding the capabilities of the Pacific Intertie, one of the United State's largest long-distance direct-current transmission routes. From the perspective of the Bonneville Power Administration and wind capacity owners in the Pacific Northwest this is annoying, because feathering wind turbines is like opening the spillways on dams - they're effectively letting power flow by uncaptured, which means they can't sell it. If the Pacific Intertie were expanded, they could sell all of the power even during large surges, which means more money for them.
Really, though, nothing is wrong. We're saturating the intertie, which is a good thing, because that means more power for power-hungry Los Angeles, and more money for money-hungry wind turbine operators. All we need to do now is advance storage technologies (Bloom Boxes, anyone?) so that we can saturate the intertie more often.
As a note, I'm very interested in bloom boxes for storage of power from unreliable sources. The efficiency numbers Bloom Energy has published are incredibly promising.
Your code should be more efficient!