CFAxisScalar: Scalar CF axis object

CFAxisScalarR Documentation

Scalar CF axis object

Description

This class represents a scalar axis. Its single value can be of any type. It is typically used as an auxiliary axis to record some parameter of interest such as the single time associated with a spatial grid with longitude, latitude and vertical axes.

Super classes

ncdfCF::CFObject -> ncdfCF::CFAxis -> CFAxisScalar

Active bindings

friendlyClassName

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

dimnames

(read-only) The coordinate of the axis.

Methods

Public methods

Inherited methods

Method new()

Create an instance of this class.

Usage
CFAxisScalar$new(grp, nc_var, orientation, value)
Arguments
grp

The group that contains the netCDF variable.

nc_var

The netCDF variable that describes this instance.

orientation

The orientation of this axis, or "" if not known.

value

The value of this axis, possibly a compound type like CFTime or CFClimatology.


Method print()

Summary of the scalar axis printed to the console.

Usage
CFAxisScalar$print(...)
Arguments
...

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

Returns

self, invisibly.


Method brief()

Some details of the axis.

Usage
CFAxisScalar$brief()
Returns

A 1-row data.frame with some details of the axis.


Method time()

Retrieve the CFTime instance that manages the time value if this scalar axis represents time.

Usage
CFAxisScalar$time()
Returns

An instance of CFTime, or NULL if this axis does not represent time.


Method subset()

Return the axis. This method returns a clone of this axis, given that a scalar axis cannot be subset.

Usage
CFAxisScalar$subset(group, rng = NULL)
Arguments
group

The group to create the new axis in.

rng

Ignored.

Returns

A CFAxisScalar cloned from this axis.


Method write()

Write the axis to a netCDF file, including its attributes.

Usage
CFAxisScalar$write(nc = NULL)
Arguments
nc

The handle of the netCDF file opened for writing or a group in the netCDF file. If NULL, write to the file or group where the axis was read from (the file must have been opened for writing). If not NULL, the handle to a netCDF file or a group therein.

Returns

Self, invisibly.


Method clone()

The objects of this class are cloneable with this method.

Usage
CFAxisScalar$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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