Description Usage Arguments Details Value Author(s) Examples
Write a netCDF file using data from a data.frame
1 | makeNetCDF(.data, newNetCDFname)
|
.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 |
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.
a text message indicating successful creation of the new file.
William Cooper
1 2 | makeNetCDF (RAFdata, "RAFdata.nc")
## Not run: makeNetCDF (Data, "./newFile.nc")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.