R/nc_IO.R

Defines functions read_nc

#' @export 
read_nc <- function(file, year_end = 2016) {
    dates = nc_date(file)
    inds = which(year(dates) <= year_end)
    # dates = dates[inds]
    arr <- ncread(file)$data[[1]][, , inds]
    arr
    # listk(arr, dates)
}
CUG-hydro/heatwave documentation built on Dec. 17, 2021, 1:53 p.m.