if (FALSE) {
## load data, prepare sets and time stamp
data("winddata", package="bReeze")
set40 <- set(height=40, v.avg=winddata[,2], v.std=winddata[,5],
dir.avg=winddata[,14])
set30 <- set(height=30, v.avg=winddata[,6], v.std=winddata[,9],
dir.avg=winddata[,16])
set20 <- set(height=20, v.avg=winddata[,10], v.std=winddata[,13])
ts <- timestamp(timestamp=winddata[,1])
## create met mast object
neubuerg <- mast(timestamp=ts, set40, set30, set20) # default
# add location and description
neubuerg.2 <- mast(timestamp=ts, set40, set30, set20,
loc=c(49.8909,11.4017), desc="Site #247 - Neubuerg")
# name sets
neubuerg.3 <- mast(timestamp=ts, C1.A1=set40, C2.A2=set30,
C3=set20, loc=c(49.8909,11.4017), desc="Site #247 - Neubuerg")
## plot met mast (time series)
plot(neubuerg) # default
plot(neubuerg, set=1, legend=FALSE) # only one set
plot(neubuerg, set="set1", legend=FALSE) # same as above
plot(neubuerg, signal=c("v.avg", "dir.avg")) # change signals
# change time scale
plot(neubuerg, subset=c("2010-01-01 00:10:00", NA))
plot(neubuerg, subset=c("2009-10-11 00:10:00", "2009-10-11 23:50:00"))
plot(neubuerg, set=1, signal="dir.avg", subset=c(NA, "2009-12-27 18:30:00"))
# customize plot
plot(neubuerg, bty="n", bty.leg="o", cex.axis=1.2, cex.lab=1.4, cex.leg=1.2,
col=c("darkblue", "red2", "darkgreen"), col.axis="darkgray",
col.lab="darkgray", col.leg="darkgray", col.ticks="darkgray",
las=0, lty=rep(1.5,3), mar=c(0.5,4,0,0.5), mgp=c(2,0.5,0),
ylab=c("v [m/s]","dir [deg]","ti [-]"), x.intersp=1)
}
Run the code above in your browser using DataLab