set_OT_input: Create Input for REddyProc/Online Tool

View source: R/Data_handling.R

set_OT_inputR Documentation

Create Input for REddyProc/Online Tool

Description

Creates input for gap-filling and flux partitioning tools implemented either offline in R (REddyProc package) or accessible online (Online Tool) from the data frame x.

Usage

set_OT_input(
  x,
  names_in,
  names_out = c("qcNEE", "NEE", "qcLE", "LE", "qcH", "H", "Rg", "Tair", "Tsoil", "rH",
    "VPD", "qcTau", "Ustar"),
  time_format = c("YDH", "YMDHM"),
  hourly = FALSE,
  qcTau_filter = TRUE
)

Arguments

x

A data frame with column names and "timestamp" column in POSIXt format.

names_in

A character vector. Column names (variables) present in x that will be used as input.

names_out

A character vector. Column names required by the tools for respective names_in.

time_format

A character string identifying supported time format of the output. Can be abbreviated.

hourly

A logical value indicating temporal resolution of timestamp. If FALSE (default), half-hourly resolution is expected.

qcTau_filter

A logical value indicating whether NEE should be filtered using qcTau flags. See details.

Details

The data frame x is expected to have certain properties. It is required that it has column names and contains column named "timestamp" of class "POSIXt" with regular sequence of date-time values with (half-)hourly time interval. Any missing values in "timestamp" are not allowed. Thus, if no records exist for given date-time value, it still has to be included. It also has to contain column names specified by names_in (respective to names_out). Default vector of names_out represents a typical set of variables used in the processing tools but can be modified. Minimum requirement is for the data frame x to include timestamp and global radiation. Columns of data frame x ideally have assigned attributes varnames and units.

The typical variables (column names; i.e. names_out) expected by the processing tools (name; unit) are quality control of net ecosystem exchange ("qcNEE"; "-"), net ecosystem exchange ("NEE"; "umol m-2 s-1"), quality control of latent heat ("qcLE"; "-"), latent heat ("LE"; "W m-2"), quality control of sensible heat ("qcH"; "-"), sensible heat ("H"; "W m-2"), global radiation ("Rg"; "W m-2"), air temperature ("Tair"; "degC"), soil temperature ("Tsoil"; "degC"), relative humidity ("rH"; "%"), vapor pressure deficit("VPD"; "hPa"), quality control of momentum flux ("qcTau"; "-") and friction velocity ("Ustar"; "m s-1"). The unicode character for a greek letter micro (e.g. in NEE units) is not accepted by the processing tools, thus it is substituted by simple "u". Check the processing tools documentation for more details.

time_format has two available options. "YDH" (default) extracts columns Year, DoY (Day of year) and Hour (decimal number) from the timestamp of x. It is less informative than "YMDHM" format but it is supported by all versions of both offline and online tools. "YMDHM" extracts columns Year, Month, Day, Hour, Minute. This format is not accepted by the current Online Tool.

Fluxes are always filtered with respective quality control flags if provided. In case of "qcTau", quality control is applied to friction velocity ("Ustar"). In case of "NEE", it is filtered according to "qcNEE" flags and if qcTau_filter = TRUE also according to "qcTau" flags. This conservative approach will assure that NEE values that cannot be compared against friction velocity threshold (Ustar filtering) will be excluded.

See Also

read_eddy and write_eddy.


lsigut/openeddy documentation built on Aug. 5, 2023, 12:25 a.m.