Title: | Adds NARR Variables Based on Date and 12 x 12 km Grid Cell |
---|---|
Description: | Adds NARR weather variables based on date and 12 x 12 km grid cell. |
Authors: | Erika Rasnick [aut, cre], Cole Brokamp [aut] |
Maintainer: | Erika Rasnick <[email protected]> |
License: | GPL-3 |
Version: | 1.0.2 |
Built: | 2024-11-11 05:00:53 UTC |
Source: | https://github.com/geomarker-io/addNarrData |
get NARR cell numbers for given lat and lon
get_narr_cell_numbers(d)
get_narr_cell_numbers(d)
d |
data.frame with columns 'lat' and 'lon' |
a data.frame identical to the input data.frame but with appended NARR cell numbers
if (FALSE) { d <- data.frame( id = c('1a', '2b', '3c'), lat = c(39.19674, 39.19674, 39.48765), lon = c(-84.582601, -84.582601, -84.610173) ) get_narr_cell_numbers(d) }
if (FALSE) { d <- data.frame( id = c('1a', '2b', '3c'), lat = c(39.19674, 39.19674, 39.48765), lon = c(-84.582601, -84.582601, -84.610173) ) get_narr_cell_numbers(d) }
get averaged NARR data for lat, lon, start_date, and end_date
get_narr_data( d, type = "coords", narr_variables = c("hpbl", "vis", "uwnd.10m", "vwnd.10m", "air.2m", "rhum.2m", "prate", "pres.sfc"), ... )
get_narr_data( d, type = "coords", narr_variables = c("hpbl", "vis", "uwnd.10m", "vwnd.10m", "air.2m", "rhum.2m", "prate", "pres.sfc"), ... )
d |
data.frame with columns 'lat', 'lon', 'start_date', and 'end_date' |
type |
type of input data. either 'coords' if starting from lat and lon columns, or 'narr_cell' if starting from narr cell ids. |
narr_variables |
a character string of desired narr variables; a subset of c("hpbl", "vis", "uwnd.10m", "vwnd.10m", "air.2m", "rhum.2m", "prate", "pres.sfc") |
... |
further arguments passed onto s3::s3_get_files |
a data.frame identical to the input data.frame but with appended average NARR values
if (FALSE) { d <- data.frame( id = c('1a', '2b', '3c'), lat = c(39.19674, 39.19674, 39.48765), lon = c(-84.582601, -84.582601, -84.610173), start_date = as.Date(c("3/8/17", "2/6/12", "6/18/20"), format = "%m/%d/%y"), end_date = as.Date(c("3/15/17", "2/13/12", "6/25/20"), format = "%m/%d/%y") ) get_narr_data(d, narr_variables = c("air.2m", "rhum.2m")) }
if (FALSE) { d <- data.frame( id = c('1a', '2b', '3c'), lat = c(39.19674, 39.19674, 39.48765), lon = c(-84.582601, -84.582601, -84.610173), start_date = as.Date(c("3/8/17", "2/6/12", "6/18/20"), format = "%m/%d/%y"), end_date = as.Date(c("3/15/17", "2/13/12", "6/25/20"), format = "%m/%d/%y") ) get_narr_data(d, narr_variables = c("air.2m", "rhum.2m")) }