Daily, high spatial resolution (~4-km) data comes from the Climatology Lab and is available for the contiguous US from 1979-yesterday.
Usage
get_gridmet_data(
x,
dates,
gridmet_var = c("tmmx", "tmmn", "pr", "srad", "vs", "th", "rmax", "rmin", "sph")
)
install_gridmet_data(
gridmet_var = c("tmmx", "tmmn", "pr", "srad", "vs", "th", "rmax", "rmin", "sph"),
gridmet_year = as.character(1979:format(Sys.Date(), "%Y"))
)
Arguments
- x
a vector of s2 cell identifers (
s2_cell
object)- dates
a list of date vectors for the NARR data, must be the same length as
x
- gridmet_var
a character string that is the name of a gridMET variable
- gridmet_year
a character string that is the year for the gridMET data; see details
Value
for get_gridmet_data()
, a list of numeric vectors of gridMET values (the same length as x
and dates
)
for install_gridmet_data()
, a character string path to gridMET raster data
Details
GRIDMET data comes as 1/24th degree gridded data, which is about 4 sq km resolution. s2 geohashes are intersected with this grid for matching with daily weather values.
gridMET variables are named:
References
Examples
d <- list(
"8841b39a7c46e25f" = as.Date(c("2024-05-18", "2024-11-06")),
"8841a45555555555" = as.Date(c("2023-06-22", "2023-08-15"))
)
get_gridmet_data(x = s2::as_s2_cell(names(d)), dates = d, gridmet_var = "tmmx")
#> $`8841b39a7c46e25f`
#> [1] 301.6 NA
#>
#> $`8841a45555555555`
#> [1] 293.6 296.3
#>
get_gridmet_data(x = s2::as_s2_cell(names(d)), dates = d, gridmet_var = "pr")
#> $`8841b39a7c46e25f`
#> [1] 0 NA
#>
#> $`8841a45555555555`
#> [1] 0.0 0.6
#>