fetch_filter: Apply Fetch Filter

View source: R/Quality_checking.R

fetch_filterR Documentation

Apply Fetch Filter

Description

fetch_filter flags all halfhours that have longer fetch distance (of given percentage of contribution to the flux) than the user defined boundary of the region of interest (ROI).

Usage

fetch_filter(x, fetch_name, wd_name, ROI_boundary, name_out = "-")

Arguments

x

A data frame with column names representing required variables.

fetch_name

A character string. Specifies the column name in x with fetch distance values.

wd_name

A character string. Specifies the column name in x with wind direction values.

ROI_boundary

A numeric vector. Represents the boundary of region of interest.

name_out

A character string providing varnames attribute value of the output.

Details

Fetch distance is used together with wind direction information to identify the cases when fetch reached beyond ROI.

The spatial extent of the studied ecosystem (ROI) is specified by its ROI_boundary that describes the distance from eddy covariance tower to the edge of the studied ecosystem. ROI_boundary has following properties:

  • the number of circular sectors is the same as the number of provided distances;

  • the angular resolution of the ROI boundary can be computed as 360 degrees / number of angular sectors;

  • the ROI boundary distances are assigned to the centers of their respective circular sectors with first sector centered on 0 degrees.

Example: ROI_boundary specified as c(150, 200, 250, 300) has following properties:

  • 4 circular sectors with 90° angular resolution;

  • ROI boundary is specified for the whole first sector (315°, 45°] at the distance 150 m from tower (center of the sector is 0°);

  • boundary of the second sector (45°, 135°] is at the distance 200 m;

  • third sector (135°, 225°] is at the distance 250 m;

  • fourth sector (225°, 315°] is at the distance 300 m.

Value

An integer vector with attributes "varnames" and "units".

See Also

combn_QC and extract_QC.

Examples

set.seed(20)
(xx <- data.frame(x_70perc = sample(1:1000, 10), WD = sample(0:360, 10)))
fetch_filter(xx, "x_70perc", "WD", 300, "qc_ALL_fetch70")


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