readNetcdf: Read netcdf files

Description Usage Arguments Examples

View source: R/readNetcdf.R

Description

Wrapper function to read files and create list object that returns a list of weather data for each grid, a table of grid coordinates and a date series as well as raw data, dimensions, variables, and attributes from the netcdf file.

Usage

1
2
3
4
5
6
readNetcdf(
  nc.file = NULL,
  leap.days = TRUE,
  omit.empty = TRUE,
  spatial.ref = "spatial_ref"
)

Arguments

nc.file

The name of the netcdf file to be read

leap.days

A logical value indicating whether the gridded data includes leap days.

omit.empty

A lotical value indicating whether empty cells with missing values to be removed

spatial.ref

PLACEHOLDER

Examples

1
2
3
4
5
6
7
8
## Not run: 
output <- readNetcdf(nc.path = system.file('extdata', package = 'gridwegen'),
    nc.file = "ntoum.nc", nc_dimnames = list(x = "lon", y = "lat", time = "time"),
    nc.variables = c("precip", "temp", "temp_min", "temp_max"),
    origin_date = as.Date("1981-01-01"),
    leap.days = TRUE)

## End(Not run)

tanerumit/gridwegen documentation built on Jan. 14, 2022, 6:40 p.m.