mast: Creation of met mast objects

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

View source: R/mast.R

Description

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

Usage

1
2
3
4
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

 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
41
## 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)

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:bReezeThe following objects are masked frompackage:stats:

    frequency, ts

The following object is masked frompackage:utils:

    timestamp

Pattern found: %d.%m.%Y %H:%M

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