Inquire About a NetCDF Variable
Inquire about a NetCDF variable.
var.inq.nc(ncfile, variable)
ncfile |
Object of class " |
variable |
Either the ID or the name of the variable to be inquired. |
This function returns information about a NetCDF variable. Information about a variable include its name, its ID, its type, its number of dimensions, a vector of the dimension IDs of this variable and the number of attributes.
A list of named components, some of which are only included for datasets in "netcdf4" format (as indicated by file.inq.nc
).
id |
Variable ID. |
name |
Variable name. |
type |
External NetCDF data type as one of the following labels: |
ndims |
Number of dimensions the variable was defined as using. |
dimids |
Vector of dimension IDs corresponding to the variable dimensions ( |
natts |
Number of variable attributes assigned to this variable. |
The arguments below apply only to datasets in "netcdf4" format:
chunksizes |
Chunk size expressed as the number of elements along each dimension, in the same order as |
cache_bytes |
Size of chunk cache in bytes ( |
cache_slots |
The number of slots in the chunk cache ( |
cache_preemption |
A value between 0 and 1 (inclusive) that biases the cache scheme towards eviction of chunks that have been fully read ( |
deflate |
Integer indicating level of compression, from 0 (minimum) to 9 (maximum), or |
shuffle |
|
big_endian |
Byte order of the variable. |
fletcher32 |
|
szip_options |
Integer containing a bitmask of szip options. |
szip_bits |
Number of bits per pixel for szip. |
filter_id |
Identifier of filter associated with the variable. |
filter_params |
Vector of integer parameters for the filter associated with the variable. |
Pavel Michna, Milton Woods
## Create a new NetCDF dataset and define two dimensions file1 <- tempfile("var.inq_", fileext=".nc") nc <- create.nc(file1) dim.def.nc(nc, "station", 5) dim.def.nc(nc, "time", unlim=TRUE) ## Create two variables, one as coordinate variable var.def.nc(nc, "time", "NC_INT", "time") var.def.nc(nc, "temperature", "NC_DOUBLE", c(0,1)) ## Inquire about these variables var.inq.nc(nc, 0) var.inq.nc(nc, "temperature") close.nc(nc) unlink(file1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.