CFBounds: CF bounds variable

CFBoundsR Documentation

CF bounds variable

Description

This class represents the bounds of an axis or an auxiliary longitude-latitude grid.

The class manages the bounds information for an axis (2 vertices per element) or an auxiliary longitude-latitude grid (4 vertices per element).

Super class

ncdfCF::CFObject -> CFBounds

Public fields

NCdim

The NCDimension that stores the netCDF dimension details of the bounds dimension (as opposed to the dimension of the associated axis).

Active bindings

friendlyClassName

(read-only) A nice description of the class.

bounds

(read-only) Retrieve the boundary values.

Methods

Public methods

Inherited methods

Method new()

Create an instance of this class.

Usage
CFBounds$new(nc_var, nc_dim, values)
Arguments
nc_var

The NC variable that describes this instance.

nc_dim

The NC dimension that defines the vertices of the bounds.

values

A matrix with the bounds values.


Method print()

Print a summary of the object to the console.

Usage
CFBounds$print(...)
Arguments
...

Arguments passed on to other functions. Of particular interest is ⁠width = ⁠ to indicate a maximum width of attribute columns.


Method range()

Retrieve the lowest and highest value in the bounds.

Usage
CFBounds$range()

Method sub_bounds()

Return bounds spanning a smaller coordinate range.

This method returns bounds which spans the range of indices given by the rng argument.

Usage
CFBounds$sub_bounds(group, rng)
Arguments
group

The group to create the new bounds in.

rng

The range of values from this bounds object to include in the returned object.

Returns

A CFBounds instance covering the indicated range of indices.


Method write()

Write the bounds variable to a netCDF file. This method should not be called directly; instead, CFArray::save() will call this method automatically.

Usage
CFBounds$write(h, object_name)
Arguments
h

The handle to a netCDF file open for writing.

object_name

The name of the object that uses these bounds, usually an axis but could also be an auxiliary CV or a parametric Z axis.


Method clone()

The objects of this class are cloneable with this method.

Usage
CFBounds$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


ncdfCF documentation built on April 16, 2025, 9:08 a.m.