R/mf_list_variables.R
mf_list_variables.RdGet the variables available for a given collection, along with a set of related information for each.
mf_list_variables(
collection,
verbose = "inform",
backend = c("auto", "cloud", "legacy"),
time_range = NULL,
collection_id = NULL,
n_granules = 10L
)Collection identifier, e.g. `"MOD11A1.061"`, `"VNP43MA4.002"` or `"GPM_3IMERGDF.07"`.
Character string: `"quiet"`, `"inform"` (default), or `"debug"`. Controls progress messages; `"debug"` also shows request details.
`"auto"` (default) chooses the service for the collection. `"cloud"` selects Earthdata Cloud; `"legacy"` selects GPM's GES DISC service.
Optional date or pair of dates used to find a Cloud granule. Only used for Cloud collections.
Optional Earthdata Cloud collection ID. Usually leave this empty; the package looks it up. Only used for Cloud collections.
Maximum number of recent Cloud files to try (default 10).
A data.frame with the variables available for the collection, and a set of related information for each variable.
The variables marked as "extractable" in the column "extractable_with_modisfast" can be provided as input parameter variables of mf_get_url. Cloud metadata comes from one accessible granule's DDS; it lists its two-dimensional fields but does not supply long names or units.
if (FALSE) { # \dontrun{
# Configure an Earthdata bearer token for Cloud OPeNDAP.
Sys.setenv(EARTHDATA_TOKEN = "your Earthdata bearer token")
time_range <- as.Date(c("2026-01-01", "2026-01-30"))
bands <- mf_list_variables("VJ121A2.002", time_range = time_range)
subset(bands, name %in% c("LST_Day_1KM", "LST_Night_1KM"))
} # }