open.nc {RNetCDF}R Documentation

Open a NetCDF Dataset

Description

Open an existing NetCDF dataset for reading and (optionally) writing.

Usage

   open.nc(con, write=FALSE, ...)

Arguments

con Filename of the NetCDF dataset to be opened.
write If FALSE (default), the dataset will be opened read-only. If TRUE, the dataset will be opened read-write.
... Arguments passed to or from other methods (not used).

Details

This function opens an existing NetCDF dataset for access. By default, the dataset is opened read-only. If write=TRUE, then the dataset can be changed. This includes appending or changing data, adding dimensions, variables, and attributes.

Value

Object of class "NetCDF" which points to the NetCDF dataset.

Author(s)

Pavel Michna

References

http://www.unidata.ucar.edu/packages/netcdf/

Examples

##  Create a void NetCDF dataset
nc <- create.nc("foo.nc")
close.nc(nc)

##  Open the NetCDF dataset for writing
nc <- open.nc("foo.nc", write=TRUE)
close.nc(nc)

[Package RNetCDF version 1.2-1 Index]