mast {bReeze}R Documentation

Creation of met mast objects

Description

Creates met mast objects from one or more datasets (measurement heights). All datasets are sorted by height in descending order.

Usage

mast(timestamp, ..., loc=NULL, desc=NULL)

## S3 method for class 'mast'
plot(x, set, signal=c("v.avg", "dir.avg", "turb.int"), subset, ...)

Arguments

timestamp

Time stamp as POSIXlt vector, e.g. created by timestamp.

...

At least one dataset created by set. For plotting function: optional graphical parameters (see below).

loc

Lat/lon coordinates of the site in decimal degrees as vector of two numeric values (optional).

desc

Plain text information about the site, measurement, met mast condition, etc. as string (optional).

x

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 given signal(s) are used.

signal

Signal(s) to be plotted as vector of strings giving the signal names.

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".

Details

Valuable information about a met mast is usually provided by an installation protocol.

Measurements of wind speed in several heights is required for the computation of the site's wind profile. Met masts might have mounted more than one sensor of the same type at the same height. Thus, the data of a broken sensor can later be substituted by the 'backup-sensor'.

Value

Returns a met mast object, which is necessary for all data analyses. A met mast object is a list of:

timestamp

Time stamp of the observations.

location

Lat/lon coordinates of the site (optional).

description

Mast information (optional).

sets

List of one or more datasets (measurement heights) consisting of height information and the data.

Optional graphical parameters

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

Author(s)

Christian Graul

See Also

POSIXlt, set, timestamp

Examples

## Not run: 
## 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)

## End(Not run)

[Package bReeze version 0.4-3 Index]