flux_calc {fluxible} | R Documentation |
calculates ecosystem gas fluxes
Description
calculates a flux based on the rate of change of gas concentration over time
Usage
flux_calc(
slopes_df,
slope_col,
datetime_col = "f_datetime",
cut_col = c(),
keep_arg = c(),
chamber_volume = 24.5,
tube_volume = 0.075,
atm_pressure = 1,
plot_area = 0.0625,
cols_keep = c(),
cols_ave = c(),
fluxid_col = "f_fluxID",
temp_air_col = "temp_air",
temp_air_unit = "celsius",
fit_type = c()
)
Arguments
slopes_df |
dataframe of flux slopes |
slope_col |
column containing the slope to calculate the flux (in ppm*s^(-1)) |
datetime_col |
column containing the datetime of each gas concentration measurements in slopes_df. The first one after cutting will be kept as datetime of each flux in the output. |
cut_col |
column containing cutting information |
keep_arg |
name in cut_col of data to keep |
chamber_volume |
volume of the flux chamber in L, default for Three-D project chamber (25x24.5x40cm), can also be a column in case it is a variable |
tube_volume |
volume of the tubing in L, default for summer 2020 setup, can also be a column in case it is a variable |
atm_pressure |
atmospheric pressure, assumed 1 atm, can be a constant (numerical) or a variable (column name) |
plot_area |
area of the plot in m^2, default for Three-D |
cols_keep |
columns to keep from the input to the output. Those columns need to have unique values for each flux, as distinct() is applied. |
cols_ave |
columns with values that should be averaged for each flux in the output. Note that NA are removed in mean calculation. |
fluxid_col |
column containing the fluxID |
temp_air_col |
column containing the air temperature used to calculate fluxes. Will be averaged with NA removed. |
temp_air_unit |
units in which air temperature was measured. Has to be either Celsius, Fahrenheit or Kelvin. |
fit_type |
(optional) model used in flux_fitting, exponential, quadratic or linear. Will be automatically filled if slopes_df was produced using flux_quality(). |
Value
a dataframe containing fluxID, fluxes (in mmol*m^(-2)*h^(-1)),
temperature average for each flux,
slope used for each flux calculation,
the model used in flux_fitting
,
and any columns specified in cols_keep and cols_ave.
Examples
data(slopes0)
flux_calc(slopes0, slope_col = "f_slope")