spti_boot | R Documentation |
Yearly space-time-equitable budgets with uncertainty estimation.
spti_boot(
df,
TimestampCol = "TIMESTAMP_START",
wdCol = "WD",
targetCol = "NEE_VUT_REF",
QcCol = "NEE_VUT_REF_QC",
interval = 1800L,
flux = c("carbon", "energy"),
nInt = 8L,
year = NULL,
samples = 100L,
NEE_scor = TRUE,
GPP_scor = FALSE,
normalize = TRUE
)
df |
A data frame. |
TimestampCol |
A character string. Specifies a column name in |
wdCol |
A character string. Specifies a column name in |
targetCol |
A character string. Specifies a column name in |
QcCol |
A character string or |
interval |
An integer value. Represents an extent of eddy covariance averaging period in seconds (e.g. 1800 for 30 mins, 3600 for 60 mins). |
flux |
A character string. What type of flux does |
nInt |
An integer value. A number of wind sectors and time intervals for binning. |
year |
An integer vector. If |
samples |
An integer value. Amount of bootstraps to produce. |
NEE_scor , GPP_scor |
A logical value. Should sign correction of NEE (GPP) be performed? |
normalize |
A logical value. If |
Data from individual years are separated to nInt
number of bins (e.g.
for nInt = 8
that is 8x8 = 64
bins) as in the original Griebel
et al. (2020) method. Each bin is then resampled samples
amount of
times with sample
size
according to the smallest amount
of records across all bins. In addition to space-time-equitable budget of
original dataset (space_time_eq_orig), 5%, 50% and 95% quantiles of
resampled datasets (space_time_eq_q05, space_time_eq_q50, space_time_eq_q95)
are provided for uncertainty assessment.
In order to obtain budgets in sensible units after summation, appropriate
flux
type must be specified. E.g. conversion factor for carbon fluxes
(umol(CO2) m-2 s-1 -> g(C) m-2 s-1) is 12.0107e-6, conversion factor for
energy fluxes (W m-2 -> MJ m-2 s-1) is 1e-6. Temporal aspect of the
conversion is handled based on interval
extent.
Space-time-equitable budgeting assures that each sector contributes equally
to budget and sector contributions are made time-uniform. Computation is
generalized for any number of nInt
and any extent of interval
.
Please notice that the reliability of the results depends on the data
availability within each year. For details see References
.
Arguments specifying df
column names represent FLUXNET standard. To
process REddyProc
outputs, timestamp must be corrected to represent
middle of averaging period and appropriate columns selected (see
Examples
).
A data frame with columns corresponding to year, space-time-equitable budget of original dataset (space_time_eq_orig), 5%, 50% and 95% quantiles of resampled datasets (space_time_eq_q05, space_time_eq_q50, space_time_eq_q95) and number of observations used for budget computation each year.
Although common sign convention for measured NEE
(Net Ecosystem Exchange) denotes negative fluxes as CO2 uptake, summed NEE
is typically reported with the opposite sign convention and is assumed to
converge to NEP (Net Ecosystem Production), especially over longer
aggregation intervals. In case of GPP (Gross Primary Production),
REddyProc
package applies sign convention denoting positive fluxes
as carbon sink, thus sign correction before summing is not needed.
Since there is no reliable way to guess the sign convention used in the
data set, NEE_scor
and GPP_scor
must be specified. The
default values (NEE_scor = TRUE
; GPP_scor = FALSE
) are
adapted to sign convention applied in REddyProc
package.
Griebel, A., Metzen, D., Pendall, E., Burba, G., & Metzger, S. (2020). Generating spatially robust carbon budgets from flux tower observations. Geophysical Research Letters, 47, e2019GL085942. https://doi.org/10.1029/2019GL085942
Griebel20_budgets
and spti_coverage
.
## Not run:
library(REddyProc)
# convert timestamp
DETha98 <- fConvertTimeToPosix(Example_DETha98, 'YDH', Year = 'Year',
Day = 'DoY', Hour = 'Hour')[-(2:4)]
# generate randomly wind directions for demonstration purposes (not included)
DETha98$WD <- sample(0:359, nrow(DETha98), replace = TRUE)
# if QcCol = NULL, all non-missing values of targetCol are used for budgeting
not_filled <- DETha98
not_filled$DateTime <- not_filled$DateTime - 900
spti_boot(not_filled, "DateTime", "WD", "LE", NULL, flux = "energy")
# gap-filling is not needed but illustrates processing of FLUXNET data
# notice that ustar filtering of NEE should be applied before budgeting
DETha98 <- filterLongRuns(DETha98, "NEE")
EProc <- sEddyProc$new('DE-Tha', DETha98,
c('NEE', 'Rg', 'Tair', 'VPD', 'Ustar'))
EProc$sMDSGapFillAfterUstar('NEE', uStarTh = 0.3, FillAll = TRUE)
filled <- cbind(DETha98, EProc$sExportResults())
# correct timestamp to represent middle of averaging period
filled$DateTime <- filled$DateTime - 900
spti_boot(filled, "DateTime", "WD", "NEE", "NEE_uStar_fqc")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.