Skip to content

Commit

Permalink
Merge pull request #3167 from infotroph/rm-dead-fn
Browse files Browse the repository at this point in the history
data.atmosphere: Delete unused helper function
  • Loading branch information
mdietze authored May 4, 2023
2 parents 0489271 + d1f1dc4 commit c258514
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 6 additions & 5 deletions modules/data.atmosphere/R/download.NARR_site.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#'
#'
#' @export
#' @importFrom rlang .data
#'
#' @author Alexey Shiklomanov
download.NARR_site <- function(outfolder,
Expand All @@ -43,7 +44,7 @@ download.NARR_site <- function(outfolder,
date_limits_chr <- strftime(range(narr_data$datetime), "%Y-%m-%d %H:%M:%S", tz = "UTC")

narr_byyear <- narr_data %>%
dplyr::mutate(year = lubridate::year(datetime)) %>%
dplyr::mutate(year = lubridate::year(.data$datetime)) %>%
dplyr::group_by(.data$year) %>%
tidyr::nest()

Expand Down Expand Up @@ -276,15 +277,15 @@ get_NARR_thredds <- function(start_date, end_date, lat.in, lon.in,
)
}
flx_data <- post_process(flx_data_raw) %>%
dplyr::select(datetime, narr_flx_vars$CF_name)
dplyr::select("datetime", narr_flx_vars$CF_name)
sfc_data <- post_process(sfc_data_raw) %>%
dplyr::select(datetime, narr_sfc_vars$CF_name)
dplyr::select("datetime", narr_sfc_vars$CF_name)
met_data <- dplyr::full_join(flx_data, sfc_data, by = "datetime") %>%
dplyr::arrange(datetime)
dplyr::arrange(.data$datetime)

if (drop_outside) {
met_data <- met_data %>%
dplyr::filter(datetime >= start_date, datetime < (end_date + lubridate::days(1)))
dplyr::filter(.data$datetime >= start_date, .data$datetime < (end_date + lubridate::days(1)))
}

met_data
Expand Down
6 changes: 0 additions & 6 deletions modules/data.atmosphere/R/met2CF.csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,6 @@ met2CF.csv <- function(in.path, in.prefix, outfolder, start_date, end_date, form
} # met2CF.csv


datetime <- function(list) {
date_string <- sapply(list, as.character)
datetime <- paste(list, "00")
return(lubridate::ymd_hms(datetime))
} # datetime

met.conv <- function(x, orig, bety, CF) {
orig <- as.character(orig)
bety <- as.character(bety)
Expand Down

0 comments on commit c258514

Please sign in to comment.