WindowGPPFourier.gts: Calculate GPP from O2 time series with gaps, in consecutive...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/GPPFourier.R

Description

Calculate GPP from O2 time series in consecutive time-windows of prescribed length. High level function to handle time series with gaps. Short gaps are interpolated, series is split at large gaps.

Usage

1
2
3
WindowGPPFourier.gts(x, dt = difftime(x[2, 1], x[1, 1], units = "days"),
  units = c("days", "hours", "mins"), gapMaxN = 4/24/dt, Width = 14,
  filtWidth = 16, ...)

Arguments

x

Dataframe containing time (POSIXt) in first column and O2 concentrations in the second column.

dt

Sampling time step. Either a difftime object or a numerical value. When dt is given as a numerical value, units have to be provided (defaults to days). When omitted dt is calculated from the time spacing between the first two samples in the data frame.

units

Unit of sampling time step

gapMaxN

Minimum number of missing data points to be considered a gap in the time series. Gaps smaller than gapMaxN are interpolated. Defaults to the number of samples corresponding to a 4 hour gap.

Width

Width [days] of the time-windows for which GPP is calculated

filtWidth

Length of moving average filter [hours] to filter O2

...

Other parameters to be passed to WindowGPPFourier()

Details

This high level function analyses multiple regular O2 time series at once, each separated by a gap larger than gapMaxN (the number of . This is convenient e.g. for regular O2 data from a single location, where some data is missing due to sensor maintenance or replacement. x is assumed to contain all these data, pasted together in a single data frame (e.g. by cbinding all individual regular time series or just reading from a single data file). Additionally, missing values within the regular series are allowed and are interpolated with gapfill. Uses WindowGPPFourier.

Value

Average gross primary production in units of oxgen as in x per day.

Author(s)

Tom Cox <tom.cox@uantwerp.be>

References

Cox T.J.S. et al. (2015) 'Estimating primary production from oxygen time series: a novel approach in the frequency domain', Limnology And Oceanography:Methods 13, 529-552. DOI: 10.1002/lom3.10046

See Also

GPPFourierPreprocess, GPPFourier_t, SunRiseSet, WindowGPPFourier

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
par(mfrow=c(2,1))
plot(Kruibeke, pch=20,xlim=as.POSIXct(c("2010-01-01", "2010-12-31")))
GPPAll_4 <- WindowGPPFourier.gts(Kruibeke, 
                                 gapMaxN = 10, 
                                 Width = 10, 
                                 filtWidth=1*24, 
                                 phi=51.176,
                                 lambda=4.326, 
                                 Detrend=TRUE, 
                                 filter=TRUE, 
                                 filtcorrect=FALSE)
plot(GPPAll_4$time,GPPAll_4$GPP*9.3, 
     col="black", 
    pch=19, 
    type="b", 
    xlab="time", 
    ylab="GPP", 
    xlim=as.POSIXct(c("2010-01-01", "2010-12-31")))

GPPFourier documentation built on Sept. 22, 2017, 5:06 p.m.