fluxx(x, var.par, subset, asterisks = FALSE, loop = "auto", ...)mf.flux(x, var.par, method = "r2", time.unit = "S", all.through = TRUE, iv = 1,
wndw = 0.1, pdk = 0.5, min.dp = 20, nrmse.lim = 0.1, r2.qual = 0.9,
range.lim = 5, out.unit = "auto", elementar = FALSE,
hardflag = list(range = TRUE), consecutive = FALSE)
chop
or alternatively one data table (for mf.flux
which will rarely be called directly by the user). Each table contains data for one chamber measurement. Minimum requirements are the columns time
=.1 == " ").
TRUE
, FALSE
or "auto". Determines how bulk flux estimations are done. If TRUE
a for
-loop is used, if FALSE
lapply
is used, and if "auto" the approach is switched automatimf.flux
."r2"
, "rmse"
, "AIC"
. Defaults to "r2"
. See Details."S"
. Other options are "M"
for minutes and "H"
for hours. ATTENTION: SetTRUE
, all data columns in x
other than the ones needed for flux calculation are also handed through the function so that they can be used in later steps of analysis. You may also specify one or several columns that x
are just numbered consecutively. The correct temporal spread is calculated inside the function when the measurement interval is specified here. Defaults to 1 which expecpdk * n
times in the data (may happen under zero to very low flux conditions), all other data is assummin.dp
is automatically adjustet to n-1.elementar = TRUE
. Defaults to FALSE.range.lim
is hard flagged by default. So when the range of concentration values for a chamber measurement isfluxx
returns a complex object of class fluxxes
that is a 2 entry list. When the object is printed to the console only the second entry is displayed in a modified form that is meant to maximize information display with small footprint for easy inspection. A table is printed to the console with three columns per gas. The first contains the quality flags (e.g. 111.9). The order is: r2.f
, range.f
,nrmse.f
, nomba.f
. The first three are considered more important, and if they are '1' everything is fine. The last number digit following the full stop gives the number of concentration readings below ambient.The data.frame
with the estimated flux rates contains all data needed for further analysis. The columns represent the entries in fluss
of the single chamber measurements (including quality flags, see below) plus naming information according to the settings in the nmes
argument of chop
. export
provides a simple way to export the results.
The first entry is itself a list of lists and data tables. It is called flux.res
. The only one first level entry in this list contains the information for one gas which is itself a list. In this list each first level entry contains the information for one chamber measurement. It is named according to the nmes
-setting in chop
and contains the elements fluss
(which is itself a list with the elements given below), mod
, out
(a list with hand through data, list items according to columns in x
that have been handed trough via all.through
or var.par
), and inn
- a data.frame with the input data that were relevant for estimating the flux (the obligatory part of var.par
).
The elements of fluss
:
r2.qual
is fulfilled.range.lim
.nrmse.lim
is fulfilled (i.e. if the nrmse of the best model <= nrmse.lim).=>
flux
but uses a different algorithm to identify the most linear part of the concentration development. First high frequency fluctations are omitted. Then all possible pdk
* n : n consecutive concentration measurements are regressed against the corresponding times. The model with the highest r2 is chosen.var.par
specifies the variables within x
and fixed parameters for all chamber placements that are used for the flux estimations. For obligatory var.par
items see flux
and examples. In contrast to flux
there is just one workhorse function doing the actual estimation (mf.flux
) per data table. Especially when there are many data tables in x
and/or many data points per data table it takes some time. Progress is shown in the console. Each dot represents one finalized data table.
Forbrich I, Kutzbach L, Hormann A, Wilmking M (2010) A comparison of linear and exponential regression for estimating diffusive CH4 fluxes by closed-chambers in peatlands. Soil Biology and Biochemistry 42: 507-515.
gpp
and reco
for further processing of the results.## load data
data(tt.nee)
## prepare flux estimation
# make parts with chop
tt.parts <- chop(tt.nee, factors=c("session", "spot"),
nmes=c("spot", "date", "session"), min.cm=40)
# prepare var.par list (like with flux)
vp <- list(CO2 = "NEE", time = "datetime", area = "area",
volume = "volume", t.air = "t.cham", p.air = 101325)
## do the flux estimation
# run fluxx. with lots of data it may take a while
# (approx. 10 sec per chamber)
tt.flux <- fluxx(tt.parts, subset=c(1:30), vp, pdk=0.5,
range.lim=3, out.unit="mg")
# inspect results table
tt.flux
# plot diagnostic plots
plot(tt.flux, dims=c(4,4), subs="spot")
# run fluxx with alternative method
tt.fluxa <- fluxx(tt.parts, subset=c(1:30), vp, pdk=0.5,
range.lim=3, out.unit="mg", method="rmse")
# inspect results
tt.fluxa
Run the code above in your browser using DataLab