day.plot: Plot diurnal wind speed

Description Usage Arguments Details Optional graphical parameters Author(s) See Also Examples

View source: R/day.plot.R

Description

Plots the diurnal variation of wind speed or wind direction.

Usage

1
2
day.plot(mast, set, dir.set=set, signal, num.sectors=NULL, subset, ...)
day(mast, set, dir.set=set, signal, num.sectors=NULL, subset, ...)

Arguments

mast

Met mast object created by mast.

set

Set used for plotting, specified as set number or set name. Argument is optional – if missing, all sets containing the choosen signal are used.

dir.set

Direction set used for sectoral splitting of the data, specified as set number or set name. Argument is used for sectoral plotting only (see num.sectors).

signal

Signal to be plotted as string.

num.sectors

Number of wind direction sectors as integer value greater 1. Argument is optional – if not NULL, data is splitted into directional sectors for plotting. Sectoral plots are available only for single sets.

subset

Optional start and end time stamp for a data subset, as string vector c(start, end). The time stamps format shall follow the rules of ISO 8601 international standard, e.g. "2012-08-08 22:55:00".

...

Optional graphical parameters, see below for details.

Details

plotDay reveals diurnal variations of a signal. The plot may show outliers that indicate data inconsistancy.

Optional graphical parameters

The following graphical parameters can optionally be added to customize the plot:

Author(s)

Christian Graul

See Also

mast

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## Not run: 
# load and prepare data
data("winddata", package="bReeze")
set40 <- set(height=40, v.avg=winddata[,2], dir.avg=winddata[,14])
set30 <- set(height=30, v.avg=winddata[,6], dir.avg=winddata[,16])
set20 <- set(height=20, v.avg=winddata[,10])
ts <- timestamp(timestamp=winddata[,1])
neubuerg <- mast(timestamp=ts, set40, set30, set20)
neubuerg <- clean(mast=neubuerg)

# plot all datasets
day.plot(mast=neubuerg, signal="v.avg")
day.plot(mast=neubuerg, signal="dir.avg")

# plot one dataset
day.plot(mast=neubuerg, set=1, signal="v.avg")
day.plot(mast=neubuerg, set="set1", signal="v.avg")	# same as above
day.plot(mast=neubuerg, set=2, signal="dir.avg")

# sectoral plot
day.plot(mast=neubuerg, set=1, signal="v.avg", num.sectors=8)

# data subsets
day.plot(mast=neubuerg, signal="v.avg", 
  subset=c("2009-12-01 00:00:00", "2009-12-31 23:50:00"))
day.plot(mast=neubuerg, signal="v.avg",  
  subset=c("2010-01-01 00:00:00", NA)) # just 'start' time stamp
day.plot(mast=neubuerg, set=1, signal="v.avg", num.sectors=4, 
  subset=c(NA, "2009-12-31 23:50:00")) # just 'end' time stamp

# customize plot
day.plot(mast=neubuerg, signal="v.avg", 
  bty="l", cex.axis=0.8, cex.lab=0.9, cex.leg=0.7, 
  col=c("darkgreen", "royalblue", "purple"), col.axis="darkgray", 
  col.box="darkgray", col.lab="darkgray", col.leg="darkgray", 
  col.ticks="darkgray", las=2, lty=c(2,3,4), lwd=1.5, mar=c(3, 3, 0.5, 0.5), 
  mgp=c(1.5, 0.5, 0), pos.leg="topleft", xlab="hour", ylab="velocity", 
  ylim=c(3.5,6), x.intersp=1, y.intersp=1)

## End(Not run)

Example output

 
This is bReeze 0.4-3
 
Type changes("bReeze") to see changes/bug fixes, help(bReeze) for documentation
or citation("bReeze") for how to cite bReeze.
 

Attaching package: 'bReeze'

The following objects are masked from 'package:stats':

    frequency, ts

The following object is masked from 'package:utils':

    timestamp

Pattern found: %d.%m.%Y %H:%M
Cleaning set 1...
2938 samples lower than 0.4 replaced by 'NA' in average wind speed
Cleaning set 2...
3361 samples lower than 0.4 replaced by 'NA' in average wind speed
Cleaning set 3...
2896 samples lower than 0.4 replaced by 'NA' in average wind speed

bReeze documentation built on May 2, 2019, 3:32 p.m.