This class is a basic ancestor to all classes that represent netCDF objects, specifically groups, dimensions, variables and the user-defined types in a netCDF file. More useful classes use this class as ancestor.
The fields in this class are common among all netCDF objects. In addition, this class manages the attributes for its descendent classes.
idNumeric identifier of the netCDF object.
nameThe name of the netCDF object.
attributesdata.frame with the attributes of the netCDF object.
new()Create a new netCDF object. This class should not be instantiated directly, create descendant objects instead.
NCObject$new(id, name)idNumeric identifier of the netCDF object.
nameCharacter string with the name of the netCDF object.
print_attributes()This function prints the attributes of the netCDF object to the console. Through object linkages, this also applies to the CF data variables and axes, which each link to a netCDF object.
NCObject$print_attributes(width = 50L)widthThe maximum width of each column in the data.frame when
printed to the console.
attribute()This method returns netCDF object attributes.
NCObject$attribute(att, field = "value")attVector of attribute names whose values to return.
fieldThe field of the attributes to return values from. This must be "value" (default), "type" or "length".
If the field argument is "type" or "length", a character vector
named with the att values that were found in the attributes. If
argument field is "value", a list with elements named with the att
values, containing the attribute value(s), except when argument att
names a single attribute, in which case that attribute value is
returned as a character string. If no attribute is named with a value
of argument att an empty list is returned, or an empty string if
there was only one value in argument att.
clone()The objects of this class are cloneable with this method.
NCObject$clone(deep = FALSE)deepWhether to make a deep clone.