Large scale weather correlations using R’s raster package

The previous post on this blog used historical wind speed data from ECMWF reanalysis. Reanalysis products are observation-based snapshots of past states of the atmosphere. They provide a physically consistent picture of the past using current models and the historical data.

For example, suppose you want to know the relation between spatially averaged Irish and Scottish wind speeds. The result from ECMWF reanalysis is shown below. Clearly Scottish and Irish wind speeds are correlated. This might have implications for trading of wind power generation between the UK and Ireland, for example.

This type of analysis is easy to do in R using Robert Hijman’s superb raster package. The first step is to download horizontal(U) and vertical(V) wind speed data from ECMWF Data Server for ERA-interim. To decode this file, the wgrib utility or similar must be installed on your system. The following code creates a raster ”stack” object consisting of 1342 U-component wind speed raster maps for NW Europe: 
library(raster)
region <- extent(-40,40,0,80) #subset selection -40W 40E 0N 80N
Ucomp.stk <- stack()
for (i in seq(1,2*1342,by=2) ){
system(paste("wgrib ERAdailyWind.grb -d ", i, " -text -o temp.txt",sep=""))
temp <- scan("temp.txt",skip=1)
temp <- t(matrix(temp,240,121))
temp.ras <- rotate(raster(temp,xmn=0,xmx=360,ymn=-90,ymx=90))
temp.ras <- crop(temp.ras,region)
Ucomp.stk <- addLayer(Ucomp.stk,temp.ras)
}
....
wind.stk <- calc(calc(Ucomp.stk,function(x) x*x)+calc(Vcomp.stk,function(x) x*x),sqrt)

The last line calculates absolute wind speeds from Ucomp.stk and Vcomp.stk. rotate() optionally shifts to Greenwich centred maps. The code for Vcomp.stk is the same as Ucomp.stk and omitted.

A rasterized map of Scotland can be created from a level 1 GADM SpatialPolygons object as follows:
UK <- getData("GADM",country="GBR",level=1)
scotland <- SpatialPolygons(UK@polygons[3])
scotland.ras <- rasterize(scotland, wind.stk,getCover=T)
scotland.ras <- scotland.ras/cellStats(scotland.ras, sum)

The option getCover=T in rasterize() means that any reanalysis cells which partially overlap Scotland are included with appropriate weight. The average wind speeds for Scotland are then:

scottish.wind.stk <- scotland.ras * wind.stk
scottish.speeds <- cellStats(scottish.wind.stk, sum)

Irish average wind speeds are found in the same way.

Finally the high density scatterplot shown above was produced using the hexbin package:


library(hexbin)
wind.bin <- hexbin(irish.speeds,scottish.speeds)
count.cols <- colorRampPalette(c("azure2","yellow","orange","red"),space="Lab")
plot(bin, colramp=function(n) count.cols(n), main="12hr Wind Speeds 2009-2010",xlab="Ireland m/s",ylab="Scotland m/s",legend=0)

 

March 21, 2011   Posted in: Climate, Wind Energy  2 Comments

Bad Power

 

The map shows mean 10m wind speeds at 1.5o resolution during the period 2009-2010. Ireland is ideally located for wind power, at the end of North Atlantic storm tracks. For many wind advocates, discussion begins and ends with maps like this one. Some advocates even argue that wind power is a reliable source of electric power and the solution to global warming, peak oil, sustainability etc. Critics say that wind power is too intermittent to be a substitute for thermal power sources. Intermittency imposes wasteful duplication and costs. Critics question to what extent it is a resource worth exploiting. Wind advocates are winning the argument; Ireland increased installed wind generation capacity from 1100MW to 1465MW (34%) in the last two years.

Opinions need to be checked against good data. Fortunately, the Irish grid operator Eirgrid provides very high quality data – total wind power generation every 15 mins.

The chart shows power generation as a % of installed wind power capacity or instantaneous “capacity factor”. Generation is certainly intermittent, with frequent jumps between periods of high ~ 80% and low ~ 5% power. The mean power is 25%. The distribution of power generation values in the above chart are shown below:

This distribution looks nothing like a bell-curve about the mean value. The most probable instantaneous power output is only 5% of installed capacity (~ 70MW currently). There is a long tail extending up to ~80%. Ireland has a favourable Atlantic location, but wind generation is intermittent and unreliable like everywhere else.

One gigantic wind turbine

Some wind power enthusiasts claim that installing more capacity and extending the grid to more locations can “fix” the intermittency problem. Another version of this idea is “the wind is always blowing somewhere”. Install enough turbines, they say, and the intermittency problem will be solved.

To test this opinion,  I used twice daily (00UTC and 12UTC) 1.5o x 1.5o global wind speed maps from ECMWF ERA for the period March 2009 to December 2010 (1342 maps). A time-series of averaged 10m wind speed over ireland was computed using a rasterized map of Ireland at the same resolution. Wind speed data can be compared to the Eirgrid wind generation data. The result is a binned scatterplot of instantaneous averaged wind speeds versus instantaneous power generation:

Clearly wind generation follows the averaged wind speed quite closely. In fact this Ireland-scale power curve is very similar to the power curve of an individual wind turbine. e.g.

 

 

In other words the entire portfolio of >50 Irish wind farms effectively behaves as a single gigantic 1,465MW wind turbine driven by the average wind speed over the island. The reason is that Ireland is small ~350km compared to the scale of synoptic weather systems >1,000km. It is either a windy day in Ireland or it is not.

Conclusion

No matter how much additional wind capacity is added to the system, the power curve will still look the same as the one derived from the Eirgrid-ERA data above. No amount of costly additional grid infrastructure to new locations can change that. Building more wind farms does not diversify the power supply or fix the intermittency problem. It effectively just increases the size of a gigantic 1,465MW wind turbine.

Installed wind capacity is supposed to increase to 5-6GW by 2020 under ambitious renewables targets. Policy and reality are about to collide.

 

March 17, 2011   Posted in: Wind Energy  6 Comments