R: Create a NetCDF Dataset

create.nc {RNetCDF} | R Documentation

## Create a NetCDF Dataset

### Description

Create a new NetCDF dataset.

### Usage

    create.nc(filename, clobber=TRUE, large=FALSE, share=FALSE, prefill=TRUE)

### Arguments

`filename` | Filename for the NetCDF dataset to be created.
`clobber` | The creation mode. If `TRUE` (default), any existing dataset with the same filename will be overwritten. Otherwise set to `FALSE`.
`large` | The file format. If `FALSE` (default), create a NetCDF classic format file, otherwise create a 64-bit offset format file. The 64-bit offset format imposes fewer restrictions on data files larger than 2 GB, but it cannot be read by NetCDF library versions earlier than 3.6.0.
`share` | The buffer scheme. If `FALSE` (default), dataset access is buffered and cached for performance. However, if one or more processes may be reading while another process is writing the dataset, set to `TRUE`.
`prefill` | The prefill mode. If `TRUE` (default), newly defined variables are initialised with fill values when they are first accessed. This allows unwritten array elements to be detected when reading, but it also implies duplicate writes if all elements are subsequently written with user-specified data. Enhanced write performance can be obtained by setting `prefill=FALSE`.

### Details

This function creates a new NetCDF dataset, returning an object of class "`NetCDF`" that can be used in R. A creation mode flag specifies whether to overwrite any existing dataset with the same name.

### Value

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

### Author(s)

Pavel Michna, Milton Woods

### References

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

### Examples

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

[Package RNetCDF version 1.9-1 Index]