Links daily, high spatial resolution (~4-km) meteorological data based on the location of each s2_cell and dates.
Usage
get_gridmet_data(
x,
gridmet_var = c("tmmx", "tmmn", "pr", "srad", "vs", "th", "rmax", "rmin", "sph"),
...
)Arguments
- x
a s2_cell_dates vector (see
?s2cd)- gridmet_var
character; name of gridMET variable
- ...
passed to
stow::stow(). Thepackageandsubdirarguments are fixed by geomarker.
Value
a list of numeric vectors of gridMET values. Locations outside the
raster extent return NA_real_ for each requested date.
Details
Data is downloaded from the Climatology Lab and is available for the contiguous US from 1979-yesterday. Data for dates within the last 60 days are considered preliminary and subject to change.
Examples
local({
withr::local_envvar(
R_USER_DATA_DIR = fs::path_package("geomarker", "gmrkr--8841"),
R_GEOMARKER_NO_DOWNLOAD = "true"
)
print(get_gridmet_data(s2cd_example_cincy(2L), "tmmx"))
})
#> Using managed local copy: /home/runner/work/_temp/Library/geomarker/gmrkr--8841/R/geomarker/stow/get_gridmet_data/bc4a5d3bf3f42744--tmmx_2024.nc
#> $`88412d013fffffff`
#> [1] 298.6 303.9 306.1
#>
#> $`884022b695555555`
#> [1] 297.3 280.5 289.3
#>