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.
idNumeric identifier of the netCDF object.
nameThe name of the netCDF object.
attributesdata.frame with the attributes of the netCDF object.
Create a new netCDF object
This class should not be instantiated directly, create descendant objects instead.
new()NCObject$new(id, name)idNumeric identifier of the netCDF object.
nameCharacter string with the name of the netCDF object. Print the attributes of the netCDF object
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.
print_attributes()NCObject$print_attributes(width = 50)widthThe maximum width of each column in the data.frame when
printed to the console.
Attributes of a netCDF object
This method returns netCDF object attributes.
attribute()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 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 an
atomic object. 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.
The fields in this class are common among all netCDF objects. In addition, this class manages the attributes for its implementing classes.