if (FALSE) {
## load and prepare data
data("winddata", package="bReeze")
set1 <- set(height=40, v.avg=winddata[,2], v.std=winddata[,5],
dir.avg=winddata[,14])
set2 <- set(height=30, v.avg=winddata[,6], v.std=winddata[,9],
dir.avg=winddata[,16])
ts <- timestamp(timestamp=winddata[,1])
neubuerg <- mast(timestamp=ts, set1, set2)
neubuerg <- clean(mast=neubuerg)
## calculate AEP
# calculate wind profile
neubuerg.wp <- profile(mast=neubuerg, v.set=c(1,2), dir.set=1,
print=FALSE)
# load power curve
pw.56 <- pc("PowerWind_56_900kW.wtg")
# calculate AEP
aep(profile=neubuerg.wp, pc=pw.56, hub.h=71)
# calculate AEP with site specific air density and availability of 97
aep(profile=neubuerg.wp, pc=pw.56, hub.h=71, rho=1.195, avail=0.97)
# calculate total AEP using sectoral profiles
aep(profile=neubuerg.wp, pc=pw.56, hub.h=71, sectoral=TRUE)
# calculate AEP for 1 m/s speed bins and without binning
aep(profile=neubuerg.wp, pc=pw.56, hub.h=71, bins=seq(0,25))
aep(profile=neubuerg.wp, pc=pw.56, hub.h=71, bins=NULL)
# change number of digits and hide results
aep(profile=neubuerg.wp, pc=pw.56, hub.h=71, digits=c(1,1,1,1))
neubuerg.aep <- aep(profile=neubuerg.wp, pc=pw.56, hub.h=71, print=FALSE)
neubuerg.aep
## plot AEP objects
# default
plot(neubuerg.aep)
# omit total AEP
plot(neubuerg.aep, show.total=FALSE)
# change colours and text sizes
plot(neubuerg.aep, col=gray(5:0 / 5), cex=0.8)
# manual definition of circles
plot(neubuerg.aep, circles=c(250, 750, 250))
# plot sectors in foreground
plot(neubuerg.aep, fg=TRUE)
# change position of axis labels
plot(neubuerg.aep, pos.axis=135)
# no legend
plot(neubuerg.aep, width.leg=0)
# freaky
plot(neubuerg.aep, border.leg=heat.colors(5), bty.leg="o",
cex.axis=0.5, cex.lab=2, cex.leg=0.5, circles=c(80, 800, 80),
col=rainbow(5), col.axis="green", col.border="orange",
col.circle="purple", col.cross="yellow", col.lab="pink",
col.leg="lightblue", fg=TRUE, lwd.border=2, lwd.circle=3,
lwd.cross=4, lty.circle="12345678", lty.cross="87654321",
sec.space=0.6, title.leg="* WiNd SpEeD *", x.intersp=2, y.intersp=5)
}
Run the code above in your browser using DataLab