makeNetCDF: makeNetCDF

Description Usage Arguments Details Value Author(s) Examples

Description

Write a netCDF file using data from a data.frame

Usage

1
makeNetCDF(.data, newNetCDFname)

Arguments

.data

A data.frame produced by getNetCDF() or otherwise converted to the corresponding structure from that function.

newNetCDFname

A character path name for the file to be created

Details

This function writes a netCDFfile that includes all variables in a data.frame. It will not overwrite an existing file, so the file 'newNetCDFname' should be deleted before a call to makeNetCDF if overwriting is desired. For this routine to work effectively, the data.frame should be produced by a call to getNetCDF() because that function also assigns attributes to the data.frame and to the variables it contains that match those in the original netCDF file. This function extracts those attributes and adds them to the netCDF file that is created. Note that, when subsetting, it will be necessary to preserve the attributes; see help for getNetCDF. The code includes an inactive function transferAttributes() for this purpose. At present, this will work for low-rate and 25-Hz variables but not for multi-dimensional variables like the hydrometeor size distributions.

Value

a text message indicating successful creation of the new file.

Author(s)

William Cooper

Examples

1
2
makeNetCDF (RAFdata, "RAFdata.nc")
## Not run: makeNetCDF (Data, "./newFile.nc")

WilliamCooper/Ranadu documentation built on July 10, 2019, 12:40 a.m.