Get daily North American Regional Reanalysis (NARR) weather data
Installs NARR raster data into user's data directory for the appc
package
Usage
get_narr_data(
x,
dates,
narr_var = c("air.2m", "hpbl", "acpcp", "rhum.2m", "vis", "pres.sfc", "uwnd.10m",
"vwnd.10m")
)
install_narr_data(
narr_var = c("air.2m", "hpbl", "acpcp", "rhum.2m", "vis", "pres.sfc", "uwnd.10m",
"vwnd.10m"),
narr_year = as.character(2016:2024)
)
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
- narr_var
a character string that is the name of a NARR variable
- narr_year
a character string that is the year for the NARR data
Value
for get_narr_data()
, a list of numeric vectors of NARR values (the same length as x
and dates
)
for install_narr_data()
, a character string path to NARR raster data
Details
NARR data comes as 0.3 degrees gridded data, which is about 32 sq km resolution. s2 geohashes are intersected with this 0.3 degree grid for matching with daily weather values.
References
https://psl.noaa.gov/data/gridded/data.narr.html
https://www.ncei.noaa.gov/products/weather-climate-models/north-american-regional
Examples
d <- list(
"8841b39a7c46e25f" = as.Date(c("2023-05-18", "2023-11-06")),
"8841a45555555555" = as.Date(c("2023-06-22", "2023-08-15"))
)
get_narr_data(x = s2::as_s2_cell(names(d)), dates = d, narr_var = "air.2m")
#> $`8841b39a7c46e25f`
#> [1] 286.4203 283.4198
#>
#> $`8841a45555555555`
#> [1] 291.6172 297.2624
#>