This class represents the boundaries of an axis or an auxiliary longitude-latitude grid.
The class manages the boundary information for an axis (2 vertices per element) or an auxiliary longitude-latitude grid (4 vertices per element).
Super classes
ncdfCF::CFObject -> ncdfCF::CFData -> CFBounds
Active bindings
friendlyClassName(read-only) A nice description of the class.
length(read-only) The length of the second dimension of the data, i.e. the number of boundary values.
vertices(read-only) The length of the first dimension of the data, i.e. the number of vertices that make up a boundary.
valuesSet or retrieve the boundary values of this object. Upon retrieval, values are read from the netCDF resource, if there is one, upon first access and cached thereafter. Upon setting values, if there is a linked netCDF resource, this object will be detached from it.
Methods
Inherited methods
ncdfCF::CFObject$append_attribute()ncdfCF::CFObject$attach_to_group()ncdfCF::CFObject$attribute()ncdfCF::CFObject$attributes_identical()ncdfCF::CFObject$delete_attribute()ncdfCF::CFObject$print_attributes()ncdfCF::CFObject$set_attribute()ncdfCF::CFObject$write_attributes()ncdfCF::CFData$detach()ncdfCF::CFData$dim()
Method new()
Create an instance of this class.
Usage
CFBounds$new(
var,
group,
values,
start = NA,
count = NA,
attributes = data.frame(),
owner_dims = 1L
)Arguments
varThe name of the boundary variable when creating a new boundary variable. When reading a boundary variable from file, the NCVariable object that describes this instance.
groupThe CFGroup that this instance will live in.
valuesOptional. The values of the boundary variable. This must be a numeric matrix whose first dimension has a length equal to the number of vertices for each boundary, and the second dimension is as long as the
CFObjectinstances that use these boundary values. Ignored when argumentvaris aNCVariableobject.startOptional. Vector of indices where to start reading boundary data along the dimensions of the data. The vector must be
NAto read all data, otherwise it must have a length equal to the dimensionality of the owning object + 1.countOptional. Vector of number of elements to read along each dimension of the boundary data. The vector must be
NAto read to the end of each dimension, otherwise it must have a length equal to the dimensionality of the owning object + 1.attributesOptional. A
data.framewith the attributes of the boundary object. When an emptydata.frame(default) and argumentvaris anNCVariableinstance, attributes of the bounds object will be taken from the netCDF resource.owner_dimsOptional, the number of dimensions of the object that these boundary values pertain to. Default is 1.
Method print()
Print a summary of the object to the console.
Method copy()
Create a copy of this bounds object The copy is completely
separate from self, meaning that both self and all of its
components are made from new instances.
Arguments
nameThe name for the new bounds object. If an empty string is passed, will use the name of this bounds object.
groupThe CFGroup where the copy of this axis will live.
Method subset()
Return a boundary variable spanning a smaller coordinate range. This currently only applies to 1-D axes.
This method returns boundary values which span the range of indices
given by the rng argument.
Arguments
groupThe CFGroup where the copy of these bounds will live.
rngThe range of values from this bounds object to include in the returned object.
Method append()
Append boundary values at the end of the current values of the boundary variable.
Arguments
fromAn instance of
CFBoundswhose values to append to the values of this boundary variable.groupThe CFGroup where the copy of these bounds will live.
Method write()
Write the boundary variable to a netCDF file. This method
should not be called directly; instead, CFVariable$save() will call
this method automatically.