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))
chop
or just one of such data tables (for mf.flux
which will rarely be called directly by the user). Each table contains data for one chamber measurement. Usually there will be identifying cmf.flux
tries hard to find the linear part of the concentration development during chamber deployment. It does so by running many regressions. Therefore, when used in bulk mode mf.flux
."r2"
, "rmse"
, "AIC"
. Defaults is "r2"
. This tries to find the linear part whilst maximimising the number of me"S"
. Other options are "M"
for minutes and "H"
for hours. Be aware that fluxes will be incorrect when this setting does not reflect thTRUE
, 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 easily. You may also specify one or a few columns 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, all other data is assumed to represent high frequency fluctuations and fluxmin.dp
is automatically adjustet to n-1.elementar = TRUE
. Defaults to FALSE.range.lim
is hard flagged. So when the range of the actual concentration values for a chamberfluxx
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. For the one behind the dot its a bit different: It just gives the number of measurements 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.Probably the most important argument is var.par
. It specifies the variables (by referring to the names of the data columns) from x
and parameters (fixed values that are constant for all chamber placements) that are used for the flux estimations. The approach is similar to the one used in flux
with the exception that there is no list item for the device quality flag. 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, 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