Learn R Programming

pbdNCDF4 (version 0.1-4)

nc_create_par: Create a parallel NetCDF File

Description

Creates a new parallel NetCDF file on a parallel file system, given the variables the new file is to contain.

Usage

nc_create_par(filename, vars, force_v4 = TRUE, verbose = FALSE, comm = 0L, info = 0L)

Arguments

filename
Name of the NetCDF file to be created.
vars
Either an object of class ncvar4 describing the variable to be created, or a vector (or list) of such objects to be created.
force_v4
If TRUE, then the created output file will always be in parallel netcdf-4 format which supports more features, but cannot be read by version 3 of the netcdf library. FALSE is not allowed.
verbose
If TRUE, then information is printed while the file is being created.
comm
a communicator number from pbdMPI.
info
a info number from pbdMPI.

Value

An object of class ncdf4, which has the fields described in nc_open.

Details

See nc_create for details. The parallel version is able to coordinate with other nc_create_par instances for more efficient operation in parallel.

References

Programming with Big Data in R Website: http://r-pbd.org/

See Also

nc_open_par, nc_var_par_access, ncdim_def, ncvar_def.

Examples

Run this code
## Not run: 
# ### Under command mode, run the demo with 2 processors by
# ### (Use Rscript.exe for windows system)
# mpiexec -np 2 Rscript -e "demo(ncwrite,'pbdNCDF4',ask=F,echo=F)"
# mpiexec -np 2 Rscript -e "demo(ncread,'pbdNCDF4',ask=F,echo=F)"
# ## End(Not run)

Run the code above in your browser using DataLab