R/get_time_bnds_from_file.R

Defines functions get_time_bounds_from_file

get_time_bounds_from_file <- function(infile, nc = NULL) {
  nc_in <- nc_open(infile)
  time_bnds <- ncvar_get(nc_in, TIME_BOUNDS_NAMES$DEFAULT,
                         collapse_degen = FALSE)
  if (is.null(nc)) nc_close(nc_in)

  return(time_bnds)
}

Try the cmsafops package in your browser

Any scripts or data that you put into this service are public.

cmsafops documentation built on Sept. 18, 2023, 5:16 p.m.