Learn R Programming

modisfast (version 2.0.0)

mf_list_variables: Get information for the variables (bands) available for a given collection

Description

Get the variables available for a given collection, along with a set of related information for each.

Usage

mf_list_variables(
  collection,
  verbose = "inform",
  backend = c("auto", "cloud", "legacy"),
  time_range = NULL,
  collection_id = NULL,
  n_granules = 10L
)

Value

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.

Arguments

collection

Collection identifier, e.g. `"MOD11A1.061"`, `"VNP43MA4.002"` or `"GPM_3IMERGDF.07"`.

verbose

Character string: `"quiet"`, `"inform"` (default), or `"debug"`. Controls progress messages; `"debug"` also shows request details.

backend

`"auto"` (default) chooses the service for the collection. `"cloud"` selects Earthdata Cloud; `"legacy"` selects GPM's GES DISC service.

time_range

Optional date or pair of dates used to find a Cloud granule. Only used for Cloud collections.

collection_id

Optional Earthdata Cloud collection ID. Usually leave this empty; the package looks it up. Only used for Cloud collections.

n_granules

Maximum number of recent Cloud files to try (default 10).

Examples

Run this code
if (FALSE) {
# 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"))
}

Run the code above in your browser using DataLab