Skip to contents

[Experimental] Calculates light response curves for CO2 fluxes and standardizes CO2 fluxes according to the LRC

Usage

flux_lrc(
  fluxes_df,
  type_col,
  par_ave = par_ave,
  f_flux = f_flux,
  lrc_arg = "LRC",
  nee_arg = "NEE",
  er_arg = "ER",
  lrc_group = c(),
  par_nee = 300,
  par_er = 0
)

Arguments

fluxes_df

a dataframe containing NEE, ER and LRC measurements

type_col

column containing type of flux (NEE, ER, LRC)

par_ave

column containing the PAR value for each flux

f_flux

column containing flux values

lrc_arg

argument designating LRC fluxes in type column

nee_arg

argument designating NEE fluxes in type column

er_arg

argument designating ER fluxes in type column

lrc_group

character vector of columns to use to group the LRC (campaign, site, treatment), if applicable

par_nee

PAR value to correct the NEE fluxes to

par_er

PAR value to correct the ER fluxes to

Value

the same dataframe with the additional column PAR_corrected_flux

Details

The light response curves are calculated with a quadratic of the form flux(PAR) = a * PAR2 + b * PAR + c

Examples

data(co2_fluxes_lrc)
flux_lrc(
fluxes_df = co2_fluxes_lrc,
type_col = type,
par_ave = PAR_ave,
f_flux = f_flux,
lrc_arg = "LRC",
nee_arg = "NEE",
er_arg = "ER",
lrc_group = c("warming"),
par_nee = 300,
par_er = 0
)
#> Joining with `by = join_by(warming)`
#> # A tibble: 231 × 6
#>      PAR_ave type  datetime            f_flux warming PAR_corrected_flux
#>        <dbl> <chr> <dttm>               <dbl> <chr>                <dbl>
#>  1 1158.     NEE   2020-08-08 16:31:00  0.489 control              34.2 
#>  2    0.0941 ER    2020-08-22 10:56:45 22.5   control              22.5 
#>  3    0.119  ER    2020-08-22 11:00:15 29.9   control              29.9 
#>  4    0.131  ER    2020-08-22 11:03:30 26.3   control              26.3 
#>  5   81.9    NEE   2020-08-22 11:07:00 13.4   control              -1.73
#>  6   87.1    NEE   2020-08-22 11:10:15 13.1   control              -1.70
#>  7   88.3    NEE   2020-08-22 11:14:45 23.6   control               8.87
#>  8    0.218  ER    2020-08-22 11:19:45 67.2   warming              67.2 
#>  9    0.252  ER    2020-08-22 11:22:45 48.8   warming              48.8 
#> 10    0.324  ER    2020-08-22 11:25:45 65.7   warming              65.7 
#> # ℹ 221 more rows