This function downloads AmeriFlux FLUXNET and BADM data files. Note: Access to AmeriFlux data requires creating an AmeriFlux account first. Register an account through the link https://ameriflux-data.lbl.gov/Pages/RequestAccount.aspx.
For details about FLUXNET and BADM data files, see AmeriFlux web pages https://ameriflux.lbl.gov/data/flux-data-products/fluxnet-publish/ and https://ameriflux.lbl.gov/data/aboutdata/badm-data-product/.
amf_download_fluxnet(
user_id,
user_email,
site_id,
data_product = "FLUXNET",
data_variant = "SUBSET",
data_policy = "CCBY4.0",
agree_policy,
intended_use,
intended_use_text,
out_dir = tempdir(),
verbose = TRUE
)
AmeriFlux account username (character)
AmeriFlux account user email (character)
A scalar or vector of character specifying the AmeriFlux Site ID (CC-Sss)
Data product (character). Currently, only "FLUXNET" is supported.
"FULLSET" or "SUBSET" (character).The default uses "SUBSET". FLUXNET data products include over 200 variables among measured and derived data, quality flags, uncertainty quantification variables, and results from intermediate data processing steps. Two data products with different selections of variables are created for data distribution. See https://fluxnet.org/data/fluxnet2015-dataset/subset-data-product/ for SUBSET variable definition. See https://fluxnet.org/data/fluxnet2015-dataset/fullset-data-product/ for FULLSET variable definition.
Data use policy (character). The default uses "CCBY4.0". AmeriFlux FLUXNET data product is all shared under the CC-BY-4.0 license. See https://ameriflux.lbl.gov/data/data-policy/#data-use for data use guidelines under each license.
Acknowledge you read and agree to the AmeriFlux Data use policy (TRUE/FALSE).
The intended use category. Currently, it needs to be one of the followings:
"synthesis" (i.e., Multi-site synthesis)
"model" (i.e., Land model/Earth system model)
"remote_sensing" (i.e., Remote sensing research)
"other_research" (i.e., Other research) "
"education" (i.e., Education (Teacher or Student))
"other"
Enter a brief description of intended use. This will be recorded in the download log and emailed to site's PI (character).
Output directory for downloaded data, default tempdir()
Show feedback on download progress (TRUE/FALSE)
A vector of download file names on the local drive
if (FALSE) {
## Download a single site, AmeriFlux-FLUXNET SUBSET data product
amf_download_fluxnet(user_id = "test",
user_email = "test _at_ mail.com",
site_id = "US-CRT",
data_product = "FLUXNET",
agree_policy = TRUE,
intended_use = "other",
intended_use_text = "testing download",
out_dir = tempdir())
## Download several sites, AmeriFlux-FLUXNET FULLSET data product
# When finished, return a list of downloaded files
# in your local drive.
file.ls <- amf_download_fluxnet(user_id = "test",
user_email = "test _at_ mail.com",
site_id = c("US-CRT", "US-ARM"),
data_product = "FLUXNET",
data_variant = "FULLSET",
agree_policy = TRUE,
intended_use = "other",
intended_use_text = "testing download",
out_dir = tempdir())
}