Description Usage Arguments Details Value Author(s) See Also Examples
Cleans faulty values of a met mast object, set or specified set of a met mast. Faulty values are replaced by NA
.
1 2 3 4 |
mast |
Met mast object created by |
set |
Set object created by |
v.avg.min |
Lower limit for wind speeds as numeric value. Default is |
v.avg.max |
Upper limit for wind speeds as numeric value. Default is |
dir.clean |
If |
turb.clean |
Wind speed limit for turbulence intensity as numeric value. Turbulence intesity values are excluded for wind speeds lower then this limit. Default is 4 m/s. |
icing |
If |
rep |
Signal (or a vector of signals), for which repetitions shall be cleaned – default is |
n.rep |
Minimum number of repetitions that shall be cleaned, as integer value – default is |
ts |
If |
Turbulence can be ignored for low wind speeds. Use turb.clean
to clean the respective turbulence intensity values. See turbulence
for more details.
If icing is detected using icing
, the time stamp should be checked to exclude implausible assumptions, e.g. in summer.
Repetitions are often generated by a corrupted data stream between sensor and data logger. Some sensors also repeat their last captured value during calm conditions. Although they are unlikely for averaged time intervals, repetitions are no faulty values by default. Do only clean repetitions if you know your data. Note: the number of repetitions n.rep
means n.rep
+1 consecutive values in a dataset are identical. The default of 5 repetitions corresponds to one hour in case of a ten minutes interval.
Uneven time intervals might come up due to rounding errors. ts
corrects them to the median
time interval.
Returns the input met mast or dataset object with cleaned data.
Christian Graul
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | ## Not run:
# load and prepare data
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])
neubuerg <- mast(timestamp=ts, set40=set40, set30=set30,
set20=set20)
# clean faulty values of a met mast
neubuerg.clean <- clean(mast=neubuerg)
# compare a subset of the original and cleaned data
neubuerg$sets$set40$data$v.avg[660:670]
neubuerg.clean$sets$set40$data$v.avg[660:670]
# clean faulty values of a dataset
set40.clean <- clean(set=set40)
# clean just one dataset of a met mast
neubuerg.clean.2 <- clean(mast=neubuerg, set=1)
neubuerg.clean.2 <- clean(mast=neubuerg, set="set40") # same as above
# change lower wind speed limit
neubuerg.clean.3 <- clean(mast=neubuerg, v.avg.min=0.3)
# compare number of samples set to 'NA', due to lowered limit
length(which(is.na(neubuerg.clean$sets$set40$data$v.avg)==TRUE))
length(which(is.na(neubuerg.clean.3$sets$set40$data$v.avg)==TRUE))
# change wind speed limit for cleaning of turbulence intensity
neubuerg.clean.4 <- clean(mast=neubuerg, turb.clean=3)
# compare number of samples set to 'NA', due to turb.clean
neubuerg.clean$sets$set40$data$turb.int[75:100]
neubuerg.clean.4$sets$set40$data$turb.int[75:100]
# check whether icing is assumed for any samples
neubuerg.clean.5 <- clean(mast=neubuerg, set=1, v.avg.min=0,
v.avg.max=100, dir.clean=FALSE, turb.clean=0, icing=TRUE)
not.cleaned <- which(is.na(neubuerg$sets$set40$data$dir.avg)==TRUE)
cleaned <- which(is.na(neubuerg.clean.5$sets$set40$data$dir.avg)==TRUE)
length(cleaned)-length(cleaned) # no icing here
# checked time stamp to exclude implausible icing assumptions (e.g. in summer)
# (which makes no sense here, since cleaned is empty)
neubuerg.clean.5$timestamp[cleaned]
# clean repetitions
neubuerg.clean.6 <- clean(mast=neubuerg, rep=c("v.avg", "dir.avg"))
neubuerg.clean.7 <- clean(mast=neubuerg, rep="v.avg", n.rep=3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.