GPPFourier_t: Calculate GPP(t) from by complex demodulation of O2 time...

Description Usage Arguments Value References See Also Examples

View source: R/GPPFourier.R

Description

Calculate GPP(t) from by complex demodulation of O2 time series

Usage

1
2
3
GPPFourier_t(x, dt = NULL, units = c("days", "hours", "mins", "secs"),
  Nfilt = NULL, nf = 1, NLowPass = NULL, fDL = NULL,
  MAcorrect = FALSE, phi = 51.176, lambda = 4.326, ...)

Arguments

x

Regularly sampled O2 time series. x can be a dataframe with time (POSIXt) in first column and O2 concentrations in second column or a vector of concentrations sampled with time step = dt

dt

Sampling time step. Either a difftime object or a numerical value. When dt is given as a numerical value, the unit is assumed to be days, unless units is provided. Can be omitted when x is a data frame, then dt is calculated from the time spacing between the first two samples.

units

Unit of sampling time step.

Nfilt

Moving average filter width for detrending time series. See GPPFourierPreprocess

nf

Number of iterative applications of moving average filter, to reduce filter width

NLowPass

Moving average filter width for low pass filtering demodulated O2 series. See demod

fDL

Optional. Relative fraction of light hours during the day. When x is a data frame, and no value for fDL is provided, fDL is calculated with fDLfun

MAcorrect

correction factor for moving average filter

phi

Latitude

lambda

Longitude

...

Other parameters to be passed to GPPFourierPreprocess

Value

Data frame with time and GPPt column.

References

Cox et al (2017). Tune in on 11.57 muHz and listen to primary production. Biogeosciences Discussions. doi:10.5194/bg-2017-81

See Also

GPPFourierPreprocess, GPPFourier, WindowGPPFourier.gts, SunRiseSet

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
# Calculate GPP(t) by complex demodulation of simulated water column time series
# More examples in vignette("GPPFourier").

dt <- as.numeric(difftime(watercolumn$time[2], watercolumn$time[1] , units="days"))
Nfilt <- 1/dt
GPPt <- GPPFourier_t(watercolumn[,c("time", "O2")], 
                        dt=dt, 
                        units="days", 
                        Detrend=TRUE, 
                        filter=TRUE, 
                        Nfilt=Nfilt, 
                        NLowPass=Nfilt, 
                        fDL=NULL, 
                        circular=FALSE, 
                        sides=2, 
                        nf=1)


par(mfrow=c(2,1), cex=1.2)
plot(watercolumn[,c("time", "O2")], type="l", xlab="", ylab=expression(paste(O[2], " [", mu, "M]")))
title(main="Water column")
plot(GPPt, type="l", lwd=3, ylim=c(0,30), xlab="", ylab="GPP")
lines(watercolumn[,c("time","GPP")], col="red")
legend("topleft", 
         lty=1, 
         col=c("red", "black"), 
         legend=c( "Simulated GPP", expression(paste("Complex demodulated ", O[2], " series"))), 
         bty="n")

tomjscox/GPPFourier documentation built on May 3, 2019, 2:57 p.m.