Inquire About a NetCDF Group
Inquire about a NetCDF group.
grp.inq.nc(ncid,grpname=NULL,ancestors=TRUE)
ncid |
Object of class " |
grpname |
By default, the inquiry relates to the group represented by |
ancestors |
If |
This function provides information about the structure of a NetCDF group or dataset. The results allow programs to explore a dataset without prior knowledge of the contents.
A list containing the following components:
self |
Object of class |
parent |
Object of class |
grps |
List of objects of class |
name |
Name of the NetCDF group. |
fullname |
Full name of the NetCDF group, with ancestors listed in order from the root group of the dataset and separated by "/". Omitted if |
dimids |
Vector of dimension identifiers. If |
unlimids |
Vector of identifiers for unlimited dimensions. If |
varids |
Vector of identifiers for variables in the group. |
typeids |
Vector of identifiers for types in the group. |
ngatts |
Number of group attributes. |
Pavel Michna, Milton Woods
## Create a new NetCDF dataset and define two dimensions file1 <- tempfile("grp.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)) ## Put some attributes att.put.nc(nc, "NC_GLOBAL", "title", "NC_CHAR", "Data from Foo") att.put.nc(nc, "NC_GLOBAL", "history", "NC_CHAR", paste("Created on", date())) ## Inquire about the root group grp.inq.nc(nc) close.nc(nc) unlink(file1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.