Learn R Programming

ncdf.tools (version 0.7.1.295)

transNcdfSubset: Cut and save a subset of a netCDF file

Description

This function reads a subset of lat/lon/time values out of a netCDF file and creates a new netCDF file with the results.

Usage

transNcdfSubset(file.input, dim.values = list(latitude = c(), longitude = c(), time = c()), values.type = c("range", "indices", "values")[2], file.output = sub("[.]nc", "_subs.nc", file.input), var.name = readNcdfVarName(file.input))

Arguments

file.input
character string: name of the input ncdf file.
dim.values
values.type
character string: type of the dim.values supplied. 'range' means that the lower an upper border are supplied, 'indices' means that 1:n indices are supplied, 'values' would imply actual coordinate values.
file.output
character string: name of the results file.
var.name

Value