01_nc_open_par: Open a parallel NetCDF File

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Opens an existing NetCDF file for reading (or, optionally, writing) in parallel.

Usage

1
2
  nc_open_par(filename, write = FALSE, readunlim = TRUE,
              verbose = FALSE, comm = 0L, info = 0L)

Arguments

filename

Name of the existing NetCDF file to be opened.

write

If FALSE (default), then the file is opened read-only. If TRUE, then writing to the file is allowed.

readunlim

When invoked, this function reads in the values of all dimensions from the associated variables. This can be slow for a large file with a long unlimited dimension. If set to FALSE, the values for the unlimited dimension are not automatically read in (they can be read in later, manually, using ncvar_get).

verbose

If TRUE, then messages are printed out during execution of this function.

comm

a communicator number from pbdMPI.

info

a info number from pbdMPI.

Details

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

Value

An object of class ncdf4 that has the fields described above.

Author(s)

George Ostrouchov, Pragneshkumar Patel pragnesh@utk.edu, Wei-Chen Chen, and Drew Schmidt.

References

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

See Also

nc_create_par, nc_var_par_access, ncdim_def, ncvar_def.

Examples

1
2
3
4
5
6
7
## 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)

pbdNCDF4 documentation built on May 2, 2019, 6:43 a.m.