NCDimension: NetCDF dimension object

NCDimensionR Documentation

NetCDF dimension object

Description

This class represents an netCDF dimensions. It contains the information on a dimension that is stored in an netCDF file. Consequently, the properties of this class are all read-only. The length of the dimension may change if data is written to an unlimited dimension, but that is managed internally.

This class is not very useful for interactive use. Use the CFAxis descendent classes instead.

Super class

ncdfCF::NCObject -> NCDimension

Active bindings

length

(read-only) The length of the dimension. If field unlim = TRUE, this field indicates the length of the data in this dimension written to file.

unlim

(read-only) Logical flag to indicate if the dimension is unlimited, i.e. that additional data may be written to file incrementing this dimension.

Methods

Public methods

Inherited methods

Method new()

Create a new netCDF dimension. This class should not be instantiated directly, create CF objects instead. This class is instantiated when opening a netCDF resource.

Usage
NCDimension$new(id, name, length, unlim, group)
Arguments
id

Numeric identifier of the netCDF dimension.

name

Character string with the name of the netCDF dimension.

length

Length of the dimension.

unlim

Is the dimension unlimited?

group

The group where the dimension is located.

Returns

A NCDimension instance.


Method print()

Summary of the NC dimension printed to the console.

Usage
NCDimension$print(...)
Arguments
...

Passed on to other methods.


Method write()

Write the dimension to a netCDF file.

Usage
NCDimension$write(h)
Arguments
h

The handle to the netCDF file to write.

Returns

Self, invisibly.


Method clone()

The objects of this class are cloneable with this method.

Usage
NCDimension$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


ncdfCF documentation built on Sept. 13, 2025, 5:07 p.m.