Pull one page-set of granules for a date window, as UMM-JSON
cmr_find_granules.RdPull one page-set of granules for a date window, as UMM-JSON
Usage
cmr_find_granules(
short_name,
t0,
t1,
provider = NULL,
page_size = 2000,
bounding_box = NULL,
polygon = NULL
)Arguments
- short_name
CMR collection short name (e.g. "MUR-JPL-L4-GLOB-v4.1")
- t0, t1
Date range (inclusive), coercible with
format()- provider
Optional CMR provider id, to disambiguate short names that exist under multiple providers
- page_size
Max granules per request (CMR hard limit ~2000 for this non-scrolling approach)
- bounding_box
Optional spatial filter: a length-4 numeric vector
c(west, south, east, north)in decimal degrees. Mutually exclusive withpolygon. Useful for subsetting swath products (e.g. MOD021KM) to a region of interest rather than pulling every granule that intersects the temporal window worldwide.- polygon
Optional spatial filter: a numeric vector of
lon, lat, lon, lat, ...vertices tracing a ring (at least 3 distinct vertices). If the first and last vertex don't match, the ring is closed automatically (with a message) – CMR requires closed polygons. Mutually exclusive withbounding_box.
Value
A tibble::tibble() with one row per granule, or NULL if
no granules matched. See cmr_audit_revisions() for the column
dictionary.
See also
Other granule functions:
cmr_audit_revisions(),
plot_cmr_lifecycle()
Examples
# \donttest{
cmr_find_granules("MUR-JPL-L4-GLOB-v4.1", as.Date("2024-01-01"), as.Date("2024-01-05"))
#> # A tibble: 6 × 11
#> granule_ur concept_id n_rev rev_date insert_date update_date production
#> <chr> <chr> <int> <chr> <chr> <chr> <chr>
#> 1 20240101090000-J… G28292389… 16 2024-01… 2024-01-10… 2024-01-10… 2024-01-1…
#> 2 20240102090000-J… G28292432… 18 2024-01… 2024-01-11… 2024-01-11… 2024-01-1…
#> 3 20240103090000-J… G28297396… 18 2024-01… 2024-01-12… 2024-01-12… 2024-01-1…
#> 4 20240104090000-J… G28302941… 17 2024-01… 2024-01-13… 2024-01-13… 2024-01-1…
#> 5 20240105090000-J… G28311561… 18 2024-01… 2024-01-14… 2024-01-14… 2024-01-1…
#> 6 20240106090000-J… G28314898… 18 2024-01… 2024-01-15… 2024-01-15… 2024-01-1…
#> # ℹ 4 more variables: temporal_start <chr>, data_url <chr>, s3_url <chr>,
#> # nc_bytes <dbl>
# subset a high-volume swath product to a region of interest
cmr_find_granules("MOD021KM", as.Date("2026-08-01"), as.Date("2026-08-01"),
bounding_box = c(140, -45, 155, -35))
#> # A tibble: 8 × 11
#> granule_ur concept_id n_rev rev_date insert_date update_date production
#> <chr> <chr> <int> <chr> <chr> <chr> <chr>
#> 1 LAADS:9975746428 G426948587… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 2 LAADS:9980651751 G427337124… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 3 LAADS:9975763948 G426949649… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 4 LAADS:9980653369 G427337154… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 5 LAADS:9975774200 G426950166… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 6 LAADS:9980668284 G427338216… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> 7 LAADS:9975768761 G426949718… 1 2026-08… 2026-08-04… 2026-08-04… 2026-08-0…
#> 8 LAADS:9980660739 G427337486… 1 2026-08… 2026-08-07… 2026-08-07… 2026-08-0…
#> # ℹ 4 more variables: temporal_start <chr>, data_url <chr>, s3_url <chr>,
#> # nc_bytes <dbl>
# }