Reads the full content of a NetCDF file, given only the file name
read_nc_onefile(
filn,
varnam = NA,
date_origin = NA,
time_is_years = FALSE,
ignore_time = FALSE,
check_flip = FALSE
)
A character string specifying the full path of the NetCDF file to be read.
A character string specifying the variable name of the NetCDF file.
Can also be a vector of character strings. Defaults to NA
, that is: all
available variables are read.
A character string of format "YYYY-MM-DD"
specifying the origin, day 0, of the time values provided in the NetCDF file.
A logical specifying whether the values provided by dimension
'time'
is years. Defaults to FALSE
.
A logical specifying whether file has a time dimension Use this to
ignore if it has a time dimension of length 1 by has_time=TRUE
. Defaults to
FALSE
.
A logical specifying whether order of latitude values should be checked.
A list, containing "lon"
(vector of longitudes of
gridcell mid-points), "lat"
(vector of latitudes of gridcell
mid-points), "time"
(vector of lubridate::ymd dates),
"varnams"
(a vector of all variable names as strings), and a
named (nested) list of the data arrays (lon x lat x time) for each
variable.