## Load the data
data(fluxes)
## Clean fluxes
fluxes=cleanFluxes(fluxes,sdCor=TRUE,sdTimes=3,timesList=3,distCor=TRUE,
thresholdList=list(H=c(-100,1000),LE=c(-100,1000)))
## Use data without NA values
fluxes_noNA<-fluxes[which(!is.na(fluxes$L)),]
## Displacement height
d=17.42
## Calculate z
fluxes_noNA$z=(fluxes_noNA$X.z.d..L*fluxes_noNA$L)+d
## Calculate zol
fluxes_noNA$zol=fluxes_noNA$z/fluxes_noNA$L
## Calculate the footprint
footprint=Calculate(fetch=500,height=33,grid=200,fluxes_noNA$wind_speed[853],
fluxes_noNA$wind_dir[853],fluxes_noNA$u.[853],fluxes_noNA$zol[853],
sqrt(fluxes_noNA$u_var[853]))
## You can also use the plot.footprint function of FREddyPro to plot the result
plotFootprint(footprint)
Run the code above in your browser using DataLab