This function downloads all AmeriFlux sites' BADM data files in a single file. 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 BADM data files, see AmeriFlux web page https://ameriflux.lbl.gov/data/aboutdata/badm-data-product/.
amf_download_bif(
user_id,
user_email,
data_policy,
agree_policy,
intended_use,
intended_use_text,
out_dir = tempdir(),
verbose = TRUE,
site_w_data = FALSE
)
AmeriFlux account username (character)
AmeriFlux account user email (character)
"CCBY4.0" or "LEGACY". AmeriFlux data are shared under two tiers of licenses as chosen by site's PI. See https://ameriflux.lbl.gov/data/data-policy/#data-use for data use guidelines under each license. Note: Data use policy selected affects which sites’ data are available for download.
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 data download log and emailed to site's PI (character).
Output directory for downloaded data, default tempdir()
Show feedback on download progress (TRUE/FALSE)
Logical, download all registered sites (FALSE) or only sites with available BASE data (TRUE)
A vector of download file names on the local drive
if (FALSE) {
## Download all sites with BASE data, under CCBY4.0 policy
amf_download_bif(user_id = "test",
user_email = "test@mail.com",
data_policy = "CCBY4.0",
agree_policy = TRUE,
intended_use = "other",
intended_use_text = "testing download",
out_dir = tempdir(),
site_w_data = TRUE)
## Download all registered sites, under LEGACY policy
amf_download_bif(user_id = "test",
user_email = "test@mail.com",
data_policy = "LEGACY",
agree_policy = TRUE,
intended_use = "other",
intended_use_text = "testing download",
out_dir = tempdir(),
site_w_data = FALSE)
}