## Load the data
data(fluxes)
## Clean and despike the fluxes
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,distCor=TRUE,timesList=3,
thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))
## Create timestamp
fluxes=createTimestamp(fluxes)
## Plot the diurnal patterns
plotDiurnal(fluxes, xVar="H", hourX="hour",yVar="LE",hourY="hour",
median=TRUE,stdev=TRUE,ylim=c(-100,400),lty=c(1,2,3,4),col=c(1,2,3,4),
legend=TRUE,legendSide='topleft',legendText=c("sensible heat","latent heat"),
lwd=2,ylab="Heat (W/m"^2~")",main="Harwood forest",cex.legend=0.9,
horiz.legend=FALSE)
abline(h=0,lty=2)
Run the code above in your browser using DataLab