amf_download_bif {amerifluxr} | R Documentation |
Download AmeriFlux BADM data product
Description
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/.
Usage
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
)
Arguments
user_id |
AmeriFlux account username (character) |
user_email |
AmeriFlux account user email (character) |
data_policy |
"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. |
agree_policy |
Acknowledge you read and agree to the AmeriFlux Data use policy (TRUE/FALSE) |
intended_use |
The intended use category. Currently, it needs to be one of the followings:
|
intended_use_text |
Enter a brief description of intended use. This will be recorded in the data download log and emailed to site's PI (character). |
out_dir |
Output directory for downloaded data, default tempdir() |
verbose |
Show feedback on download progress (TRUE/FALSE) |
site_w_data |
Logical, download all registered sites (FALSE) or only sites with available BASE data (TRUE) |
Value
A vector of download file names on the local drive
See Also
Examples
## Not run:
## 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)
## End(Not run)