Closed jonathancallahan closed 5 years ago
I think we still want a getDaylightHours() function that will work like this:
getDaylightHours()
getDaylightHours <- function( datetime = NULL, bbox = CONUS ) { # validate, etc. # figure out timezone from bbox # Calculate single day, hourly time axis datetime <- MazamaCoreUtils::parseDatetime(datetime, timezone = timezone) start <- lubridate::floor_date(datetime, unit = "day") end <- start + lubridate::dhours(23) hours <- seq(start, end, by = "hour") # Subset to only daylight hours daylightMask <- isDaylight(hours, box) hours <- hours[daylightMask] return(hours) }
Per conversation, we agreed this won't be needed.
I think we still want a
getDaylightHours()
function that will work like this: