makeNetCDF: makeNetCDF

makeNetCDFR Documentation

makeNetCDF

Description

Write a netCDF file using data from a data.frame

Usage

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. At present, this will work for low-rate and 25-Hz variables but not for multi-dimensional variables like hydrometeor size distributions.

Value

a text message indicating successful creation of the new file.

Author(s)

William Cooper

Examples

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

NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.